[TASK] Change check for TYPO3_MODE
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / ext_tables.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 /**
5 * $GLOBALS['PAGES_TYPES'] defines the various types of pages (field: doktype) the system
6 * can handle and what restrictions may apply to them.
7 * Here you can set the icon and especially you can define which tables are
8 * allowed on a certain pagetype (doktype)
9 * NOTE: The 'default' entry in the $GLOBALS['PAGES_TYPES'] array is the 'base' for all
10 * types, and for every type the entries simply overrides the entries in the 'default' type!
11 */
12 $GLOBALS['PAGES_TYPES'] = array(
13 (string) \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_LINK => array(),
14 (string) \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_SHORTCUT => array(),
15 (string) \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_BE_USER_SECTION => array(
16 'type' => 'web',
17 'allowedTables' => '*'
18 ),
19 (string) \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_MOUNTPOINT => array(),
20 (string) \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_SPACER => array(
21 'type' => 'sys'
22 ),
23 (string) \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_SYSFOLDER => array(
24 // Doktype 254 is a 'Folder' - a general purpose storage folder for whatever you like.
25 // In CMS context it's NOT a viewable page. Can contain any element.
26 'type' => 'sys',
27 'allowedTables' => '*'
28 ),
29 (string) \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_RECYCLER => array(
30 // Doktype 255 is a recycle-bin.
31 'type' => 'sys',
32 'allowedTables' => '*'
33 ),
34 'default' => array(
35 'type' => 'web',
36 'allowedTables' => 'pages',
37 'onlyAllowedTables' => '0'
38 ),
39 );
40
41 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('sys_category');
42
43 /** @var \TYPO3\CMS\Core\Resource\Driver\DriverRegistry $registry */
44 $registry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\Driver\\DriverRegistry');
45 $registry->addDriversToTCA();
46
47 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('sys_file_reference');
48 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('sys_file_collection');
49
50 /**
51 * $TBE_MODULES contains the structure of the backend modules as they are
52 * arranged in main- and sub-modules. Every entry in this array represents a
53 * menu item on either first (key) or second level (value from list) in the
54 * left menu in the TYPO3 backend
55 * For information about adding modules to TYPO3 you should consult the
56 * documentation found in "Inside TYPO3"
57 */
58 $GLOBALS['TBE_MODULES'] = array(
59 'web' => 'list',
60 'file' => '',
61 'user' => '',
62 'tools' => '',
63 'system' => '',
64 'help' => ''
65 );
66
67
68 // Register the page tree core navigation component
69 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addCoreNavigationComponent('web', 'typo3-pagetree');
70
71
72 /**
73 * $TBE_STYLES configures backend styles and colors; Basically this contains
74 * all the values that can be used to create new skins for TYPO3.
75 * For information about making skins to TYPO3 you should consult the
76 * documentation found in "Inside TYPO3"
77 */
78 $GLOBALS['TBE_STYLES'] = array(
79 'colorschemes' => array(
80 '0' => '#E4E0DB,#CBC7C3,#EDE9E5'
81 ),
82 'borderschemes' => array(
83 '0' => array('border:solid 1px black;', 5)
84 )
85 );
86
87
88 /**
89 * Setting up $TCA_DESCR - Context Sensitive Help (CSH)
90 * For information about using the CSH API in TYPO3 you should consult the
91 * documentation found in "Inside TYPO3"
92 */
93 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('pages', 'EXT:lang/locallang_csh_pages.xlf');
94 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('be_users', 'EXT:lang/locallang_csh_be_users.xlf');
95 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('be_groups', 'EXT:lang/locallang_csh_be_groups.xlf');
96 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('sys_filemounts', 'EXT:lang/locallang_csh_sysfilem.xlf');
97 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('sys_language', 'EXT:lang/locallang_csh_syslang.xlf');
98 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('sys_news', 'EXT:lang/locallang_csh_sysnews.xlf');
99 // General Core
100 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('xMOD_csh_corebe', 'EXT:lang/locallang_csh_corebe.xlf');
101 // Extension manager
102 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_tools_em', 'EXT:lang/locallang_csh_em.xlf');
103 // Web > Info
104 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_web_info', 'EXT:lang/locallang_csh_web_info.xlf');
105 // Web > Func
106 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_web_func', 'EXT:lang/locallang_csh_web_func.xlf');
107 // Labels for TYPO3 4.5 and greater.
108 // These labels override the ones set above, while still falling back to the original labels
109 // if no translation is available.
110 $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['EXT:lang/locallang_csh_pages.xlf'][] = 'EXT:lang/4.5/locallang_csh_pages.xlf';
111 $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['EXT:lang/locallang_csh_corebe.xlf'][] = 'EXT:lang/4.5/locallang_csh_corebe.xlf';
112
113
114 /**
115 * $FILEICONS defines icons for the various file-formats
116 */
117 $GLOBALS['FILEICONS'] = array(
118 'txt' => 'txt.gif',
119 'pdf' => 'pdf.gif',
120 'doc' => 'doc.gif',
121 'ai' => 'ai.gif',
122 'bmp' => 'bmp.gif',
123 'tif' => 'tif.gif',
124 'htm' => 'htm.gif',
125 'html' => 'html.gif',
126 'pcd' => 'pcd.gif',
127 'gif' => 'gif.gif',
128 'jpg' => 'jpg.gif',
129 'jpeg' => 'jpg.gif',
130 'mpg' => 'mpg.gif',
131 'mpeg' => 'mpeg.gif',
132 'exe' => 'exe.gif',
133 'com' => 'exe.gif',
134 'zip' => 'zip.gif',
135 'tgz' => 'zip.gif',
136 'gz' => 'zip.gif',
137 'php3' => 'php3.gif',
138 'php4' => 'php3.gif',
139 'php5' => 'php3.gif',
140 'php6' => 'php3.gif',
141 'php' => 'php3.gif',
142 'ppt' => 'ppt.gif',
143 'ttf' => 'ttf.gif',
144 'pcx' => 'pcx.gif',
145 'png' => 'png.gif',
146 'tga' => 'tga.gif',
147 'class' => 'java.gif',
148 'sxc' => 'sxc.gif',
149 'sxw' => 'sxw.gif',
150 'xls' => 'xls.gif',
151 'swf' => 'swf.gif',
152 'swa' => 'flash.gif',
153 'dcr' => 'flash.gif',
154 'wav' => 'wav.gif',
155 'mp3' => 'mp3.gif',
156 'avi' => 'avi.gif',
157 'au' => 'au.gif',
158 'mov' => 'mov.gif',
159 '3ds' => '3ds.gif',
160 'csv' => 'csv.gif',
161 'ico' => 'ico.gif',
162 'max' => 'max.gif',
163 'ps' => 'ps.gif',
164 'tmpl' => 'tmpl.gif',
165 'fh3' => 'fh3.gif',
166 'inc' => 'inc.gif',
167 'mid' => 'mid.gif',
168 'psd' => 'psd.gif',
169 'xml' => 'xml.gif',
170 'rtf' => 'rtf.gif',
171 't3x' => 't3x.gif',
172 't3d' => 't3d.gif',
173 'cdr' => 'cdr.gif',
174 'dtd' => 'dtd.gif',
175 'sgml' => 'sgml.gif',
176 'ani' => 'ani.gif',
177 'css' => 'css.gif',
178 'eps' => 'eps.gif',
179 'js' => 'js.gif',
180 'wrl' => 'wrl.gif',
181 'default' => 'default.gif'
182 );
183
184
185 /**
186 * Backend sprite icon-names
187 */
188 $GLOBALS['TBE_STYLES']['spriteIconApi']['coreSpriteImageNames'] = array(
189 'actions-document-close',
190 'actions-document-duplicates-select',
191 'actions-document-edit-access',
192 'actions-document-export-csv',
193 'actions-document-export-t3d',
194 'actions-document-history-open',
195 'actions-document-import-t3d',
196 'actions-document-info',
197 'actions-document-localize',
198 'actions-document-move',
199 'actions-document-new',
200 'actions-document-open',
201 'actions-document-open-read-only',
202 'actions-document-paste-after',
203 'actions-document-paste-into',
204 'actions-document-save',
205 'actions-document-save-close',
206 'actions-document-save-new',
207 'actions-document-save-view',
208 'actions-document-select',
209 'actions-document-synchronize',
210 'actions-document-view',
211 'actions-edit-add',
212 'actions-edit-copy',
213 'actions-edit-copy-release',
214 'actions-edit-cut',
215 'actions-edit-cut-release',
216 'actions-edit-delete',
217 'actions-edit-download',
218 'actions-edit-hide',
219 'actions-edit-insert-default',
220 'actions-edit-localize-status-high',
221 'actions-edit-localize-status-low',
222 'actions-edit-merge-localization',
223 'actions-edit-pick-date',
224 'actions-edit-rename',
225 'actions-edit-restore',
226 'actions-edit-undelete-edit',
227 'actions-edit-undo',
228 'actions-edit-unhide',
229 'actions-edit-upload',
230 'actions-input-clear',
231 'actions-insert-record',
232 'actions-insert-reference',
233 'actions-markstate',
234 'actions-message-error-close',
235 'actions-message-information-close',
236 'actions-message-notice-close',
237 'actions-message-ok-close',
238 'actions-message-warning-close',
239 'actions-move-down',
240 'actions-move-left',
241 'actions-move-move',
242 'actions-move-right',
243 'actions-move-to-bottom',
244 'actions-move-to-top',
245 'actions-move-up',
246 'actions-page-move',
247 'actions-page-new',
248 'actions-page-open',
249 'actions-selection-delete',
250 'actions-system-backend-user-emulate',
251 'actions-system-backend-user-switch',
252 'actions-system-cache-clear',
253 'actions-system-cache-clear-impact-high',
254 'actions-system-cache-clear-impact-low',
255 'actions-system-cache-clear-impact-medium',
256 'actions-system-cache-clear-rte',
257 'actions-system-extension-configure',
258 'actions-system-extension-documentation',
259 'actions-system-extension-download',
260 'actions-system-extension-import',
261 'actions-system-extension-install',
262 'actions-system-extension-sqldump',
263 'actions-system-extension-uninstall',
264 'actions-system-extension-update',
265 'actions-system-extension-update-disabled',
266 'actions-system-help-open',
267 'actions-system-list-open',
268 'actions-system-options-view',
269 'actions-system-pagemodule-open',
270 'actions-system-refresh',
271 'actions-system-shortcut-new',
272 'actions-system-tree-search-open',
273 'actions-system-typoscript-documentation',
274 'actions-system-typoscript-documentation-open',
275 'actions-template-new',
276 'actions-unmarkstate',
277 'actions-version-document-remove',
278 'actions-version-page-open',
279 'actions-version-swap-version',
280 'actions-version-swap-workspace',
281 'actions-version-workspace-preview',
282 'actions-version-workspace-sendtostage',
283 'actions-view-go-back',
284 'actions-view-go-down',
285 'actions-view-go-forward',
286 'actions-view-go-up',
287 'actions-view-list-collapse',
288 'actions-view-list-expand',
289 'actions-view-paging-first',
290 'actions-view-paging-first-disabled',
291 'actions-view-paging-last',
292 'actions-view-paging-last-disabled',
293 'actions-view-paging-next',
294 'actions-view-paging-next-disabled',
295 'actions-view-paging-previous',
296 'actions-view-paging-previous-disabled',
297 'actions-view-table-collapse',
298 'actions-view-table-expand',
299 'actions-window-open',
300 'apps-clipboard-images',
301 'apps-clipboard-list',
302 'apps-filetree-folder-add',
303 'apps-filetree-folder-default',
304 'apps-filetree-folder-list',
305 'apps-filetree-folder-locked',
306 'apps-filetree-folder-media',
307 'apps-filetree-folder-news',
308 'apps-filetree-folder-opened',
309 'apps-filetree-folder-recycler',
310 'apps-filetree-folder-temp',
311 'apps-filetree-folder-user',
312 'apps-filetree-mount',
313 'apps-filetree-root',
314 'apps-irre-collapsed',
315 'apps-irre-expanded',
316 'apps-pagetree-backend-user',
317 'apps-pagetree-backend-user-hideinmenu',
318 'apps-pagetree-collapse',
319 'apps-pagetree-drag-copy-above',
320 'apps-pagetree-drag-copy-below',
321 'apps-pagetree-drag-move-above',
322 'apps-pagetree-drag-move-below',
323 'apps-pagetree-drag-move-between',
324 'apps-pagetree-drag-move-into',
325 'apps-pagetree-drag-new-between',
326 'apps-pagetree-drag-new-inside',
327 'apps-pagetree-drag-place-denied',
328 'apps-pagetree-expand',
329 'apps-pagetree-folder-contains-approve',
330 'apps-pagetree-folder-contains-board',
331 'apps-pagetree-folder-contains-fe_users',
332 'apps-pagetree-folder-contains-news',
333 'apps-pagetree-folder-contains-shop',
334 'apps-pagetree-folder-default',
335 'apps-pagetree-page-advanced',
336 'apps-pagetree-page-advanced-hideinmenu',
337 'apps-pagetree-page-advanced-root',
338 'apps-pagetree-page-backend-users',
339 'apps-pagetree-page-backend-users-hideinmenu',
340 'apps-pagetree-page-backend-users-root',
341 'apps-pagetree-page-default',
342 'apps-pagetree-page-domain',
343 'apps-pagetree-page-frontend-user',
344 'apps-pagetree-page-frontend-user-hideinmenu',
345 'apps-pagetree-page-frontend-user-root',
346 'apps-pagetree-page-frontend-users',
347 'apps-pagetree-page-frontend-users-hideinmenu',
348 'apps-pagetree-page-frontend-users-root',
349 'apps-pagetree-page-mountpoint',
350 'apps-pagetree-page-mountpoint-hideinmenu',
351 'apps-pagetree-page-mountpoint-root',
352 'apps-pagetree-page-no-icon-found',
353 'apps-pagetree-page-no-icon-found-hideinmenu',
354 'apps-pagetree-page-no-icon-found-root',
355 'apps-pagetree-page-not-in-menu',
356 'apps-pagetree-page-recycler',
357 'apps-pagetree-page-shortcut',
358 'apps-pagetree-page-shortcut-external',
359 'apps-pagetree-page-shortcut-external-hideinmenu',
360 'apps-pagetree-page-shortcut-external-root',
361 'apps-pagetree-page-shortcut-hideinmenu',
362 'apps-pagetree-page-shortcut-root',
363 'apps-pagetree-root',
364 'apps-pagetree-spacer',
365 'apps-tcatree-select-recursive',
366 'apps-toolbar-menu-actions',
367 'apps-toolbar-menu-cache',
368 'apps-toolbar-menu-opendocs',
369 'apps-toolbar-menu-search',
370 'apps-toolbar-menu-shortcut',
371 'apps-toolbar-menu-workspace',
372 'mimetypes-compressed',
373 'mimetypes-excel',
374 'mimetypes-media-audio',
375 'mimetypes-media-flash',
376 'mimetypes-media-image',
377 'mimetypes-media-video',
378 'mimetypes-other-other',
379 'mimetypes-pdf',
380 'mimetypes-powerpoint',
381 'mimetypes-text-css',
382 'mimetypes-text-csv',
383 'mimetypes-text-html',
384 'mimetypes-text-js',
385 'mimetypes-text-php',
386 'mimetypes-text-text',
387 'mimetypes-word',
388 'mimetypes-x-content-divider',
389 'mimetypes-x-content-domain',
390 'mimetypes-x-content-form',
391 'mimetypes-x-content-form-search',
392 'mimetypes-x-content-header',
393 'mimetypes-x-content-html',
394 'mimetypes-x-content-image',
395 'mimetypes-x-content-link',
396 'mimetypes-x-content-list-bullets',
397 'mimetypes-x-content-list-files',
398 'mimetypes-x-content-login',
399 'mimetypes-x-content-menu',
400 'mimetypes-x-content-multimedia',
401 'mimetypes-x-content-page-language-overlay',
402 'mimetypes-x-content-plugin',
403 'mimetypes-x-content-script',
404 'mimetypes-x-content-table',
405 'mimetypes-x-content-template',
406 'mimetypes-x-content-template-extension',
407 'mimetypes-x-content-template-static',
408 'mimetypes-x-content-text',
409 'mimetypes-x-content-text-picture',
410 'mimetypes-x-sys_action',
411 'mimetypes-x-sys_category',
412 'mimetypes-x-sys_language',
413 'mimetypes-x-sys_news',
414 'mimetypes-x-sys_workspace',
415 'mimetypes-x_belayout',
416 'status-dialog-error',
417 'status-dialog-information',
418 'status-dialog-notification',
419 'status-dialog-ok',
420 'status-dialog-warning',
421 'status-overlay-access-restricted',
422 'status-overlay-deleted',
423 'status-overlay-hidden',
424 'status-overlay-icon-missing',
425 'status-overlay-includes-subpages',
426 'status-overlay-locked',
427 'status-overlay-scheduled',
428 'status-overlay-scheduled-future-end',
429 'status-overlay-translated',
430 'status-status-checked',
431 'status-status-current',
432 'status-status-edit-read-only',
433 'status-status-icon-missing',
434 'status-status-locked',
435 'status-status-permission-denied',
436 'status-status-permission-granted',
437 'status-status-readonly',
438 'status-status-reference-hard',
439 'status-status-reference-soft',
440 'status-status-sorting-asc',
441 'status-status-sorting-desc',
442 'status-status-sorting-light-asc',
443 'status-status-sorting-light-desc',
444 'status-status-workspace-draft',
445 'status-system-extension-required',
446 'status-user-admin',
447 'status-user-backend',
448 'status-user-frontend',
449 'status-user-group-backend',
450 'status-user-group-frontend',
451 'status-version-1',
452 'status-version-2',
453 'status-version-3',
454 'status-version-4',
455 'status-version-5',
456 'status-version-6',
457 'status-version-7',
458 'status-version-8',
459 'status-version-9',
460 'status-version-10',
461 'status-version-11',
462 'status-version-12',
463 'status-version-13',
464 'status-version-14',
465 'status-version-15',
466 'status-version-16',
467 'status-version-17',
468 'status-version-18',
469 'status-version-19',
470 'status-version-20',
471 'status-version-21',
472 'status-version-22',
473 'status-version-23',
474 'status-version-24',
475 'status-version-25',
476 'status-version-26',
477 'status-version-27',
478 'status-version-28',
479 'status-version-29',
480 'status-version-30',
481 'status-version-31',
482 'status-version-32',
483 'status-version-33',
484 'status-version-34',
485 'status-version-35',
486 'status-version-36',
487 'status-version-37',
488 'status-version-38',
489 'status-version-39',
490 'status-version-40',
491 'status-version-41',
492 'status-version-42',
493 'status-version-43',
494 'status-version-44',
495 'status-version-45',
496 'status-version-46',
497 'status-version-47',
498 'status-version-48',
499 'status-version-49',
500 'status-version-50',
501 'status-version-no-version',
502 'status-warning-in-use',
503 'status-warning-lock',
504 'treeline-blank',
505 'treeline-join',
506 'treeline-joinbottom',
507 'treeline-jointop',
508 'treeline-line',
509 'treeline-minus',
510 'treeline-minusbottom',
511 'treeline-minusonly',
512 'treeline-minustop',
513 'treeline-plus',
514 'treeline-plusbottom',
515 'treeline-plusonly',
516 'treeline-stopper',
517 'empty-icon'
518 );
519
520
521 $GLOBALS['TBE_STYLES']['spriteIconApi']['spriteIconRecordOverlayPriorities'] = array(
522 'deleted',
523 'hidden',
524 'starttime',
525 'endtime',
526 'futureendtime',
527 'fe_group',
528 'protectedSection'
529 );
530
531
532 $GLOBALS['TBE_STYLES']['spriteIconApi']['spriteIconRecordOverlayNames'] = array(
533 'hidden' => 'status-overlay-hidden',
534 'fe_group' => 'status-overlay-access-restricted',
535 'starttime' => 'status-overlay-scheduled',
536 'endtime' => 'status-overlay-scheduled',
537 'futureendtime' => 'status-overlay-scheduled-future-end',
538 'readonly' => 'status-overlay-locked',
539 'deleted' => 'status-overlay-deleted',
540 'missing' => 'status-overlay-missing',
541 'translated' => 'status-overlay-translated',
542 'protectedSection' => 'status-overlay-includes-subpages'
543 );