[TASK] Improve usability by adding filters to TCA fields
[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 if (TYPO3_MODE === 'FE') {
14
15 // Register eID provider for showpic
16 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_cms_showpic'] = 'EXT:frontend/Resources/PHP/Eid/ShowPic.php';
17 // Register eID provider for ExtDirect for the frontend
18 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['ExtDirect'] = 'EXT:frontend/Resources/PHP/Eid/ExtDirect.php';
19
20 // Register all available content objects
21 $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'] = array_merge($GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'], array(
22 'TEXT' => \TYPO3\CMS\Frontend\ContentObject\TextContentObject::class,
23 'CASE' => \TYPO3\CMS\Frontend\ContentObject\CaseContentObject::class,
24 'COA' => \TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject::class,
25 'COA_INT' => \TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayInternalContentObject::class,
26 'USER' => \TYPO3\CMS\Frontend\ContentObject\UserContentObject::class,
27 'USER_INT' => \TYPO3\CMS\Frontend\ContentObject\UserInternalContentObject::class,
28 'FILE' => \TYPO3\CMS\Frontend\ContentObject\FileContentObject::class,
29 'FILES' => \TYPO3\CMS\Frontend\ContentObject\FilesContentObject::class,
30 'IMAGE' => \TYPO3\CMS\Frontend\ContentObject\ImageContentObject::class,
31 'IMG_RESOURCE' => \TYPO3\CMS\Frontend\ContentObject\ImageResourceContentObject::class,
32 'CONTENT' => \TYPO3\CMS\Frontend\ContentObject\ContentContentObject::class,
33 'RECORDS' => \TYPO3\CMS\Frontend\ContentObject\RecordsContentObject::class,
34 'HMENU' => \TYPO3\CMS\Frontend\ContentObject\HierarchicalMenuContentObject::class,
35 'LOAD_REGISTER' => \TYPO3\CMS\Frontend\ContentObject\LoadRegisterContentObject::class,
36 'RESTORE_REGISTER' => \TYPO3\CMS\Frontend\ContentObject\RestoreRegisterContentObject::class,
37 'TEMPLATE' => \TYPO3\CMS\Frontend\ContentObject\TemplateContentObject::class,
38 'FLUIDTEMPLATE' => \TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::class,
39 'SVG' => \TYPO3\CMS\Frontend\ContentObject\ScalableVectorGraphicsContentObject::class,
40 'EDITPANEL' => \TYPO3\CMS\Frontend\ContentObject\EditPanelContentObject::class
41 ));
42 }
43
44
45 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('
46 options.saveDocView = 1
47 options.saveDocNew = 1
48 options.saveDocNew.pages = 0
49 options.saveDocNew.sys_file = 0
50 options.disableDelete.sys_file = 1
51 ');
52 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
53 mod.wizards.newContentElement {
54 renderMode = tabs
55 wizardItems {
56 common.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common
57 common.elements {
58 header {
59 icon = gfx/c_wiz/regular_header.gif
60 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_headerOnly_title
61 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_headerOnly_description
62 tt_content_defValues {
63 CType = header
64 }
65 }
66 text {
67 icon = gfx/c_wiz/regular_text.gif
68 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_regularText_title
69 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_regularText_description
70 tt_content_defValues {
71 CType = text
72 }
73 }
74 textpic {
75 icon = gfx/c_wiz/text_image_right.gif
76 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_textImage_title
77 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_textImage_description
78 tt_content_defValues {
79 CType = textpic
80 imageorient = 17
81 }
82 }
83 image {
84 icon = gfx/c_wiz/images_only.gif
85 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_imagesOnly_title
86 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_imagesOnly_description
87 tt_content_defValues {
88 CType = image
89 }
90 }
91 bullets {
92 icon = gfx/c_wiz/bullet_list.gif
93 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_bulletList_title
94 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_bulletList_description
95 tt_content_defValues {
96 CType = bullets
97 }
98 }
99 table {
100 icon = gfx/c_wiz/table.gif
101 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_table_title
102 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_table_description
103 tt_content_defValues {
104 CType = table
105 }
106 }
107
108 }
109 common.show = header,text,textpic,image,bullets,table
110
111 special.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special
112 special.elements {
113 uploads {
114 icon = gfx/c_wiz/filelinks.gif
115 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_filelinks_title
116 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_filelinks_description
117 tt_content_defValues {
118 CType = uploads
119 }
120 }
121 menu {
122 icon = gfx/c_wiz/sitemap2.gif
123 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_menus_title
124 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_menus_description
125 tt_content_defValues {
126 CType = menu
127 menu_type = 0
128 }
129 }
130 html {
131 icon = gfx/c_wiz/html.gif
132 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_plainHTML_title
133 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_plainHTML_description
134 tt_content_defValues {
135 CType = html
136 }
137 }
138 div {
139 icon = gfx/c_wiz/div.gif
140 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_divider_title
141 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_divider_description
142 tt_content_defValues {
143 CType = div
144 }
145 }
146 shortcut {
147 icon = gfx/c_wiz/shortcut.gif
148 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_shortcut_title
149 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_shortcut_description
150 tt_content_defValues {
151 CType = shortcut
152 }
153 }
154
155 }
156 special.show = uploads,menu,html,div,shortcut
157
158 # dummy placeholder for forms group
159 forms.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:forms
160
161 plugins.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins
162 plugins.elements {
163 general {
164 icon = gfx/c_wiz/user_defined.gif
165 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins_general_title
166 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins_general_description
167 tt_content_defValues.CType = list
168 }
169 }
170 plugins.show = *
171 }
172 }
173
174 ');
175
176 // Registering hooks for the treelist cache
177 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
178 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
179 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['moveRecordClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
180
181 // Register search keys
182 $GLOBALS['TYPO3_CONF_VARS']['SYS']['livesearch']['page'] = 'pages';
183 $GLOBALS['TYPO3_CONF_VARS']['SYS']['livesearch']['content'] = 'tt_content';
184
185 // Register hook to show preview info
186 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_previewInfo']['cms'] = \TYPO3\CMS\Frontend\Hooks\FrontendHooks::class . '->hook_previewInfo';