3026fce9e7fedd9b8cf6cc97c221f00b60db25d0
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / ext_localconf.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 if (TYPO3_MODE === 'FE' && !isset($_REQUEST['eID'])) {
5 \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class)->connect(
6 \TYPO3\CMS\Core\Resource\Index\MetaDataRepository::class,
7 'recordPostRetrieval',
8 \TYPO3\CMS\Frontend\Aspect\FileMetadataOverlayAspect::class,
9 'languageAndWorkspaceOverlay'
10 );
11 }
12
13 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript(
14 'frontend',
15 'setup',
16 'config.extTarget = _top'
17 );
18
19
20 if (TYPO3_MODE === 'FE') {
21
22 // Register eID provider for showpic
23 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_cms_showpic'] = 'EXT:frontend/Resources/PHP/Eid/ShowPic.php';
24 // Register eID provider for ExtDirect for the frontend
25 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['ExtDirect'] = 'EXT:frontend/Resources/PHP/Eid/ExtDirect.php';
26
27 // Register the core media wizard provider
28 \TYPO3\CMS\Frontend\MediaWizard\MediaWizardProviderManager::registerMediaWizardProvider(\TYPO3\CMS\Frontend\MediaWizard\MediaWizardProvider::class);
29
30 // Register all available content objects
31 $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'] = array_merge($GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'], array(
32 'TEXT' => \TYPO3\CMS\Frontend\ContentObject\TextContentObject::class,
33 'CASE' => \TYPO3\CMS\Frontend\ContentObject\CaseContentObject::class,
34 'COBJ_ARRAY' => \TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject::class,
35 'COA' => \TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject::class,
36 'COA_INT' => \TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayInternalContentObject::class,
37 'USER' => \TYPO3\CMS\Frontend\ContentObject\UserContentObject::class,
38 'USER_INT' => \TYPO3\CMS\Frontend\ContentObject\UserInternalContentObject::class,
39 'FILE' => \TYPO3\CMS\Frontend\ContentObject\FileContentObject::class,
40 'FILES' => \TYPO3\CMS\Frontend\ContentObject\FilesContentObject::class,
41 'IMAGE' => \TYPO3\CMS\Frontend\ContentObject\ImageContentObject::class,
42 'IMG_RESOURCE' => \TYPO3\CMS\Frontend\ContentObject\ImageResourceContentObject::class,
43 'CONTENT' => \TYPO3\CMS\Frontend\ContentObject\ContentContentObject::class,
44 'RECORDS' => \TYPO3\CMS\Frontend\ContentObject\RecordsContentObject::class,
45 'HMENU' => \TYPO3\CMS\Frontend\ContentObject\HierarchicalMenuContentObject::class,
46 'CASEFUNC' => \TYPO3\CMS\Frontend\ContentObject\CaseContentObject::class,
47 'LOAD_REGISTER' => \TYPO3\CMS\Frontend\ContentObject\LoadRegisterContentObject::class,
48 'RESTORE_REGISTER' => \TYPO3\CMS\Frontend\ContentObject\RestoreRegisterContentObject::class,
49 'TEMPLATE' => \TYPO3\CMS\Frontend\ContentObject\TemplateContentObject::class,
50 'FLUIDTEMPLATE' => \TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::class,
51 'MULTIMEDIA' => \TYPO3\CMS\Frontend\ContentObject\MultimediaContentObject::class,
52 'MEDIA' => \TYPO3\CMS\Frontend\ContentObject\MediaContentObject::class,
53 'SWFOBJECT' => \TYPO3\CMS\Frontend\ContentObject\ShockwaveFlashObjectContentObject::class,
54 'FLOWPLAYER' => \TYPO3\CMS\Frontend\ContentObject\FlowPlayerContentObject::class,
55 'QTOBJECT' => \TYPO3\CMS\Frontend\ContentObject\QuicktimeObjectContentObject::class,
56 'SVG' => \TYPO3\CMS\Frontend\ContentObject\ScalableVectorGraphicsContentObject::class,
57 'EDITPANEL' => \TYPO3\CMS\Frontend\ContentObject\EditPanelContentObject::class
58 ));
59 }
60
61
62 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('
63 options.saveDocView = 1
64 options.saveDocNew = 1
65 options.saveDocNew.pages = 0
66 options.saveDocNew.sys_file = 0
67 options.disableDelete.sys_file = 1
68 TCAdefaults.tt_content.imagecols = 2
69 ');
70 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
71 mod.wizards.newContentElement {
72 renderMode = tabs
73 wizardItems {
74 common.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common
75 common.elements {
76 header {
77 icon = gfx/c_wiz/regular_header.gif
78 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_headerOnly_title
79 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_headerOnly_description
80 tt_content_defValues {
81 CType = header
82 }
83 }
84 text {
85 icon = gfx/c_wiz/regular_text.gif
86 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_regularText_title
87 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_regularText_description
88 tt_content_defValues {
89 CType = text
90 }
91 }
92 textpic {
93 icon = gfx/c_wiz/text_image_right.gif
94 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_textImage_title
95 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_textImage_description
96 tt_content_defValues {
97 CType = textpic
98 imageorient = 17
99 }
100 }
101 image {
102 icon = gfx/c_wiz/images_only.gif
103 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_imagesOnly_title
104 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_imagesOnly_description
105 tt_content_defValues {
106 CType = image
107 }
108 }
109 bullets {
110 icon = gfx/c_wiz/bullet_list.gif
111 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_bulletList_title
112 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_bulletList_description
113 tt_content_defValues {
114 CType = bullets
115 }
116 }
117 table {
118 icon = gfx/c_wiz/table.gif
119 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_table_title
120 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_table_description
121 tt_content_defValues {
122 CType = table
123 }
124 }
125
126 }
127 common.show = header,text,textpic,image,bullets,table
128
129 special.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special
130 special.elements {
131 uploads {
132 icon = gfx/c_wiz/filelinks.gif
133 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_filelinks_title
134 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_filelinks_description
135 tt_content_defValues {
136 CType = uploads
137 }
138 }
139 menu {
140 icon = gfx/c_wiz/sitemap2.gif
141 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_menus_title
142 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_menus_description
143 tt_content_defValues {
144 CType = menu
145 menu_type = 0
146 }
147 }
148 html {
149 icon = gfx/c_wiz/html.gif
150 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_plainHTML_title
151 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_plainHTML_description
152 tt_content_defValues {
153 CType = html
154 }
155 }
156 div {
157 icon = gfx/c_wiz/div.gif
158 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_divider_title
159 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_divider_description
160 tt_content_defValues {
161 CType = div
162 }
163 }
164 shortcut {
165 icon = gfx/c_wiz/shortcut.gif
166 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_shortcut_title
167 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_shortcut_description
168 tt_content_defValues {
169 CType = shortcut
170 }
171 }
172
173 }
174 special.show = uploads,menu,html,div,shortcut
175
176 # dummy placeholder for forms group
177 forms.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:forms
178
179 plugins.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins
180 plugins.elements {
181 general {
182 icon = gfx/c_wiz/user_defined.gif
183 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins_general_title
184 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins_general_description
185 tt_content_defValues.CType = list
186 }
187 }
188 plugins.show = *
189 }
190 }
191
192 ');
193
194 // Registering hooks for the treelist cache
195 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
196 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
197 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['moveRecordClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
198
199 // Register search keys
200 $GLOBALS['TYPO3_CONF_VARS']['SYS']['livesearch']['page'] = 'pages';
201 $GLOBALS['TYPO3_CONF_VARS']['SYS']['livesearch']['content'] = 'tt_content';
202
203 // Register hook to show preview info
204 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_previewInfo']['cms'] = \TYPO3\CMS\Frontend\Hooks\FrontendHooks::class . '->hook_previewInfo';