removed empty line at EOF
[Packages/TYPO3.CMS.git] / t3lib / stddb / tables.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2008 Kasper Skaarhoj (kasperYYYY@typo3.com)
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 * A copy is found in the textfile GPL.txt and important notices to the license
17 * from the author is found in LICENSE.txt distributed with these scripts.
18 *
19 *
20 * This script is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
27 /**
28 * Contains the initialization of global TYPO3 variables among which $TCA is the most significant.
29 *
30 * The list in order of apperance is: $PAGES_TYPES, $ICON_TYPES, $LANG_GENERAL_LABELS, $TCA, $TBE_MODULES, $TBE_STYLES, $FILEICONS
31 * These variables are first of all used in the backend but to some degree in the frontend as well. (See references)
32 * See the document "Inside TYPO3" for a description of each variable in addition to the comment associated with each.
33 *
34 * This file is included from "typo3/init.php" (backend) and "index_ts.php" (frontend) as the first file of a three-fold inclusion session (see references):
35 * 1) First this script is included (unless the constant "TYPO3_tables_script" instructs another filename to substitute it, see t3lib/config_default.php); This should initialize the variables shown above.
36 * 2) Then either the "typo3conf/temp_CACHED_??????_ext_tables.php" cache file OR "stddb/load_ext_tables.php" is included in order to let extensions add/modify these variables as they desire.
37 * 3) Finally if the constant "TYPO3_extTableDef_script" defines a file name from typo3conf/ it is included, also for overriding values (the old-school way before extensions came in). See config_default.php
38 *
39 * Configuration in this file should NOT be edited directly. If you would like to alter
40 * or extend this information, please make an extension which does so.
41 * Thus you preserve backwards compatibility.
42 *
43 *
44 * $Id$
45 * Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj
46 *
47 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
48 * @see tslib_fe::includeTCA(), typo3/init.php, t3lib/stddb/load_ext_tables.php
49 * @link http://typo3.org/doc.0.html?&tx_extrepmgm_pi1[extUid]=262&cHash=4f12caa011
50 */
51
52
53 /**
54 * $PAGES_TYPES defines the various types of pages (field: doktype) the system can handle and what restrictions may apply to them.
55 * Here you can set the icon and especially you can define which tables are allowed on a certain pagetype (doktype)
56 * NOTE: The 'default' entry in the $PAGES_TYPES-array is the 'base' for all types, and for every type the entries simply overrides the entries in the 'default' type!
57 */
58 $PAGES_TYPES = array(
59 '254' => array( // Doktype 254 is a 'sysFolder' - a general purpose storage folder for whatever you like. In CMS context it's NOT a viewable page. Can contain any element.
60 'type' => 'sys',
61 'icon' => 'sysf.gif',
62 'allowedTables' => '*'
63 ),
64 '255' => array( // Doktype 255 is a recycle-bin.
65 'type' => 'sys',
66 'icon' => 'recycler.gif',
67 'allowedTables' => '*'
68 ),
69 'default' => array(
70 'type' => 'web',
71 'icon' => 'pages.gif',
72 'allowedTables' => 'pages',
73 'onlyAllowedTables' => '0'
74 )
75 );
76
77
78 /**
79 * With $ICON_TYPES you can assign alternative icons to pages records based on another field than 'doktype'
80 * Each key is a value from the "module" field of page records and the value is an array with a key/value pair, eg. "icon" => "modules_shop.gif"
81 *
82 * @see t3lib_iconWorks::getIcon(), typo3/sysext/cms/ext_tables.php
83 */
84 $ICON_TYPES = array();
85
86
87 /**
88 * Commonly used language labels which can be used in the $TCA array and elsewhere.
89 * Obsolete - just use the values of each entry directly.
90 * @todo turn into an object with magic getters and setter so we can make use of the deprecation logging
91 * @deprecated since TYPO3 3.6
92 */
93 $LANG_GENERAL_LABELS = array(
94 'endtime' => 'LLL:EXT:lang/locallang_general.php:LGL.endtime',
95 'hidden' => 'LLL:EXT:lang/locallang_general.php:LGL.hidden',
96 'starttime' => 'LLL:EXT:lang/locallang_general.php:LGL.starttime',
97 'fe_group' => 'LLL:EXT:lang/locallang_general.php:LGL.fe_group',
98 'hide_at_login' => 'LLL:EXT:lang/locallang_general.php:LGL.hide_at_login',
99 'any_login' => 'LLL:EXT:lang/locallang_general.php:LGL.any_login',
100 'usergroups' => 'LLL:EXT:lang/locallang_general.php:LGL.usergroups',
101 );
102
103
104
105
106
107
108
109
110
111
112
113
114 /**
115 * $TCA:
116 * This array configures TYPO3 to work with the tables from the database by assigning meta information about data types, relations etc.
117 * The global variable $TCA will contain the information needed to recognize and render each table in the backend
118 * See documentation 'Inside TYPO3' for the syntax and list of required tables/fields!
119 *
120 * The tables configured in this document (and backed up by "tbl_be.php") is the required minimum set of tables/field that any TYPO3 system MUST have. These tables are therefore a part of the TYPO3 core.
121 * The SQL definitions of these tables (and some more which are not defined in $TCA) is found in the file "tables.sql"
122 * Only the "pages" table is defined fully in this file - the others are only defined for the "ctrl" part and the columns are defined in detail in the associated file, "tbl_be.php"
123 *
124 * NOTE: The (default) icon for a table is defined 1) as a giffile named 'gfx/i/[tablename].gif' or 2) as the value of [table][ctrl][iconfile]
125 * NOTE: [table][ctrl][rootLevel] goes NOT for pages. Apart from that if rootLevel is true, records can ONLY be created on rootLevel. If it's false records can ONLY be created OUTSIDE rootLevel
126 */
127 $TCA = array();
128
129 /**
130 * Table "pages":
131 * The mandatory pages table. The backbone of the TYPO3 page tree structure.
132 * All other records configured in $TCA must have a field, "pid", which relates the record to a page record's "uid" field.
133 * Must be COMPLETELY configured in tables.php
134 */
135 $TCA['pages'] = array(
136 'ctrl' => array(
137 'label' => 'title',
138 'tstamp' => 'tstamp',
139 'sortby' => 'sorting',
140 'title' => 'LLL:EXT:lang/locallang_tca.php:pages',
141 'type' => 'doktype',
142 'versioningWS' => 2,
143 'origUid' => 't3_origuid',
144 'delete' => 'deleted',
145 'crdate' => 'crdate',
146 'hideAtCopy' => 1,
147 'prependAtCopy' => 'LLL:EXT:lang/locallang_general.php:LGL.prependAtCopy',
148 'cruser_id' => 'cruser_id',
149 'editlock' => 'editlock',
150 'useColumnsForDefaultValues' => 'doktype'
151 ),
152 'interface' => array(
153 'showRecordFieldList' => 'doktype,title',
154 'maxDBListItems' => 30,
155 'maxSingleDBListItems' => 50
156 ),
157 'columns' => array(
158 'doktype' => array(
159 'exclude' => 1,
160 'label' => 'LLL:EXT:lang/locallang_general.php:LGL.type',
161 'config' => array(
162 'type' => 'select',
163 'items' => array(
164 array('LLL:EXT:lang/locallang_tca.php:doktype.I.0', '1', 'i/pages.gif'),
165 array('LLL:EXT:lang/locallang_tca.php:doktype.I.1', '254', 'i/sysf.gif'),
166 array('LLL:EXT:lang/locallang_tca.php:doktype.I.2', '255', 'i/recycler.gif')
167 ),
168 'default' => '1',
169 'iconsInOptionTags' => 1,
170 'noIconsBelowSelect' => 1,
171 )
172 ),
173 'title' => array(
174 'label' => 'LLL:EXT:lang/locallang_tca.php:title',
175 'config' => array(
176 'type' => 'input',
177 'size' => '30',
178 'max' => '255',
179 'eval' => 'required'
180 )
181 ),
182 'TSconfig' => array(
183 'exclude' => 1,
184 'label' => 'TSconfig:',
185 'config' => array(
186 'type' => 'text',
187 'cols' => '40',
188 'rows' => '5',
189 'wizards' => array(
190 '_PADDING' => 4,
191 '0' => array(
192 'type' => t3lib_extMgm::isLoaded('tsconfig_help')?'popup':'',
193 'title' => 'TSconfig QuickReference',
194 'script' => 'wizard_tsconfig.php?mode=page',
195 'icon' => 'wizard_tsconfig.gif',
196 'JSopenParams' => 'height=500,width=780,status=0,menubar=0,scrollbars=1',
197 )
198 ),
199 'softref' => 'TSconfig'
200 ),
201 'defaultExtras' => 'fixed-font : enable-tab',
202 ),
203 'php_tree_stop' => array(
204 'exclude' => 1,
205 'label' => 'LLL:EXT:lang/locallang_tca.php:php_tree_stop',
206 'config' => array(
207 'type' => 'check'
208 )
209 ),
210 'is_siteroot' => array(
211 'exclude' => 1,
212 'label' => 'LLL:EXT:lang/locallang_tca.php:is_siteroot',
213 'config' => array(
214 'type' => 'check'
215 )
216 ),
217 'storage_pid' => array(
218 'exclude' => 1,
219 'label' => 'LLL:EXT:lang/locallang_tca.php:storage_pid',
220 'config' => array(
221 'type' => 'group',
222 'internal_type' => 'db',
223 'allowed' => 'pages',
224 'size' => '1',
225 'maxitems' => '1',
226 'minitems' => '0',
227 'show_thumbs' => '1'
228 )
229 ),
230 'tx_impexp_origuid' => array('config'=>array('type'=>'passthrough')),
231 't3ver_label' => array(
232 'label' => 'LLL:EXT:lang/locallang_general.php:LGL.versionLabel',
233 'config' => array(
234 'type' => 'input',
235 'size' => '30',
236 'max' => '30',
237 )
238 ),
239 'editlock' => array(
240 'exclude' => 1,
241 'label' => 'LLL:EXT:lang/locallang_tca.php:editlock',
242 'config' => array(
243 'type' => 'check'
244 )
245 ),
246 ),
247 'types' => array(
248 '1' => array('showitem' => 'doktype, title, TSconfig;;6;nowrap, storage_pid;;7'),
249 '254' => array('showitem' => 'doktype, title;LLL:EXT:lang/locallang_general.php:LGL.title, TSconfig;;6;nowrap, storage_pid;;7'),
250 '255' => array('showitem' => 'doktype, title, TSconfig;;6;nowrap, storage_pid;;7')
251 ),
252 'palettes' => array(
253 '6' => array('showitem' => 'php_tree_stop, editlock'),
254 '7' => array('showitem' => 'is_siteroot')
255 )
256 );
257
258 /**
259 * Table "be_users":
260 * Backend Users for TYPO3.
261 * This is only the 'header' part (ctrl). The full configuration is found in t3lib/stddb/tbl_be.php
262 */
263 $TCA['be_users'] = array(
264 'ctrl' => array(
265 'label' => 'username',
266 'tstamp' => 'tstamp',
267 'title' => 'LLL:EXT:lang/locallang_tca.php:be_users',
268 'crdate' => 'crdate',
269 'cruser_id' => 'cruser_id',
270 'delete' => 'deleted',
271 'adminOnly' => 1, // Only admin users can edit
272 'rootLevel' => 1,
273 'default_sortby' => 'ORDER BY admin, username',
274 'enablecolumns' => array(
275 'disabled' => 'disable',
276 'starttime' => 'starttime',
277 'endtime' => 'endtime'
278 ),
279 'type' => 'admin',
280 'typeicon_column' => 'admin',
281 'typeicons' => array(
282 '0' => 'be_users.gif',
283 '1' => 'be_users_admin.gif'
284 ),
285 'mainpalette' => '1',
286 'useColumnsForDefaultValues' => 'usergroup,lockToDomain,options,db_mountpoints,file_mountpoints,fileoper_perms,userMods',
287 'dividers2tabs' => true,
288 'dynamicConfigFile' => 'T3LIB:tbl_be.php',
289 'versioningWS_alwaysAllowLiveEdit' => TRUE
290 )
291 );
292
293 /**
294 * Table "be_groups":
295 * Backend Usergroups for TYPO3.
296 * This is only the 'header' part (ctrl). The full configuration is found in t3lib/stddb/tbl_be.php
297 */
298 $TCA['be_groups'] = array(
299 'ctrl' => array(
300 'label' => 'title',
301 'tstamp' => 'tstamp',
302 'crdate' => 'crdate',
303 'cruser_id' => 'cruser_id',
304 'delete' => 'deleted',
305 'default_sortby' => 'ORDER BY title',
306 'prependAtCopy' => 'LLL:EXT:lang/locallang_general.php:LGL.prependAtCopy',
307 'adminOnly' => 1,
308 'rootLevel' => 1,
309 'type' => 'inc_access_lists',
310 'typeicon_column' => 'inc_access_lists',
311 'typeicons' => array(
312 '1' => 'be_groups_lists.gif'
313 ),
314 'enablecolumns' => array(
315 'disabled' => 'hidden'
316 ),
317 'title' => 'LLL:EXT:lang/locallang_tca.php:be_groups',
318 'useColumnsForDefaultValues' => 'lockToDomain, fileoper_perms',
319 'dividers2tabs' => true,
320 'dynamicConfigFile' => 'T3LIB:tbl_be.php',
321 'versioningWS_alwaysAllowLiveEdit' => TRUE
322 )
323 );
324
325 /**
326 * Table "sys_filemounts":
327 * Defines filepaths on the server which can be mounted for users so they can upload and manage files online by eg. the Filelist module
328 * This is only the 'header' part (ctrl). The full configuration is found in t3lib/stddb/tbl_be.php
329 */
330 $TCA['sys_filemounts'] = array(
331 'ctrl' => array(
332 'label' => 'title',
333 'tstamp' => 'tstamp',
334 'prependAtCopy' => 'LLL:EXT:lang/locallang_general.php:LGL.prependAtCopy',
335 'title' => 'LLL:EXT:lang/locallang_tca.php:sys_filemounts',
336 'adminOnly' => 1,
337 'rootLevel' => 1,
338 'delete' => 'deleted',
339 'enablecolumns' => array(
340 'disabled' => 'hidden'
341 ),
342 'iconfile' => '_icon_ftp.gif',
343 'useColumnsForDefaultValues' => 'path,base',
344 'dynamicConfigFile' => 'T3LIB:tbl_be.php',
345 'versioningWS_alwaysAllowLiveEdit' => TRUE
346 )
347 );
348
349 /**
350 * Table "sys_filemounts":
351 * Defines filepaths on the server which can be mounted for users so they can upload and manage files online by eg. the Filelist module
352 * This is only the 'header' part (ctrl). The full configuration is found in t3lib/stddb/tbl_be.php
353 */
354 $TCA['sys_workspace'] = array(
355 'ctrl' => array(
356 'label' => 'title',
357 'tstamp' => 'tstamp',
358 'title' => 'LLL:EXT:lang/locallang_tca.php:sys_workspace',
359 'adminOnly' => 1,
360 'rootLevel' => 1,
361 'delete' => 'deleted',
362 'iconfile' => 'sys_workspace.png',
363 'dynamicConfigFile' => 'T3LIB:tbl_be.php',
364 'versioningWS_alwaysAllowLiveEdit' => true,
365 'dividers2tabs' => true
366 )
367 );
368
369 /**
370 * Table "sys_languages":
371 * Defines possible languages used for translation of records in the system
372 * This is only the 'header' part (ctrl). The full configuration is found in t3lib/stddb/tbl_be.php
373 */
374 $TCA['sys_language'] = array(
375 'ctrl' => array(
376 'label' => 'title',
377 'tstamp' => 'tstamp',
378 'default_sortby' => 'ORDER BY title',
379 'title' => 'LLL:EXT:lang/locallang_tca.php:sys_language',
380 'adminOnly' => 1,
381 'rootLevel' => 1,
382 'enablecolumns' => array(
383 'disabled' => 'hidden'
384 ),
385 'dynamicConfigFile' => 'T3LIB:tbl_be.php',
386 'versioningWS_alwaysAllowLiveEdit' => TRUE
387 )
388 );
389
390
391
392
393
394
395
396
397
398
399
400
401 /**
402 * $TBE_MODULES contains the structure of the backend modules as they are arranged in main- and sub-modules.
403 * Every entry in this array represents a menu item on either first (key) or second level (value from list) in the left menu in the TYPO3 backend
404 * For information about adding modules to TYPO3 you should consult the documentation found in "Inside TYPO3"
405 */
406 $TBE_MODULES = array(
407 'web' => 'list,info,perm,func',
408 'file' => 'list',
409 'user' => 'ws',
410 'tools' => 'em',
411 'help' => 'about,cshmanual'
412 );
413
414
415 /**
416 * $TBE_STYLES configures backend styles and colors; Basically this contains all the values that can be used to create new skins for TYPO3.
417 * For information about making skins to TYPO3 you should consult the documentation found in "Inside TYPO3"
418 */
419 $TBE_STYLES = array(
420 'colorschemes' => array(
421 '0' => '#E4E0DB,#CBC7C3,#EDE9E5',
422 ),
423 'borderschemes' => array(
424 '0' => array('border:solid 1px black;',5)
425 )
426 );
427
428
429 /**
430 * Setting up $TCA_DESCR - Context Sensitive Help (CSH)
431 * For information about using the CSH API in TYPO3 you should consult the documentation found in "Inside TYPO3"
432 */
433 t3lib_extMgm::addLLrefForTCAdescr('pages','EXT:lang/locallang_csh_pages.xml');
434 t3lib_extMgm::addLLrefForTCAdescr('be_users','EXT:lang/locallang_csh_be_users.xml');
435 t3lib_extMgm::addLLrefForTCAdescr('be_groups','EXT:lang/locallang_csh_be_groups.xml');
436 t3lib_extMgm::addLLrefForTCAdescr('sys_filemounts','EXT:lang/locallang_csh_sysfilem.xml');
437 t3lib_extMgm::addLLrefForTCAdescr('sys_language','EXT:lang/locallang_csh_syslang.xml');
438 t3lib_extMgm::addLLrefForTCAdescr('sys_workspace','EXT:lang/locallang_csh_sysws.xml');
439 t3lib_extMgm::addLLrefForTCAdescr('xMOD_csh_corebe','EXT:lang/locallang_csh_corebe.xml'); // General Core
440 t3lib_extMgm::addLLrefForTCAdescr('_MOD_tools_em','EXT:lang/locallang_csh_em.xml'); // Extension manager
441 t3lib_extMgm::addLLrefForTCAdescr('_MOD_web_info','EXT:lang/locallang_csh_web_info.xml'); // Web > Info
442 t3lib_extMgm::addLLrefForTCAdescr('_MOD_web_func','EXT:lang/locallang_csh_web_func.xml'); // Web > Func
443
444
445 /**
446 * $FILEICONS defines icons for the various file-formats
447 */
448 $FILEICONS = array(
449 'txt' => 'txt.gif',
450 'pdf' => 'pdf.gif',
451 'doc' => 'doc.gif',
452 'ai' => 'ai.gif',
453 'bmp' => 'bmp.gif',
454 'tif' => 'tif.gif',
455 'htm' => 'htm.gif',
456 'html' => 'html.gif',
457 'pcd' => 'pcd.gif',
458 'gif' => 'gif.gif',
459 'jpg' => 'jpg.gif',
460 'jpeg' => 'jpg.gif',
461 'mpg' => 'mpg.gif',
462 'mpeg' => 'mpeg.gif',
463 'exe' => 'exe.gif',
464 'com' => 'exe.gif',
465 'zip' => 'zip.gif',
466 'tgz' => 'zip.gif',
467 'gz' => 'zip.gif',
468 'php3' => 'php3.gif',
469 'php4' => 'php3.gif',
470 'php5' => 'php3.gif',
471 'php6' => 'php3.gif',
472 'php' => 'php3.gif',
473 'ppt' => 'ppt.gif',
474 'ttf' => 'ttf.gif',
475 'pcx' => 'pcx.gif',
476 'png' => 'png.gif',
477 'tga' => 'tga.gif',
478 'class' => 'java.gif',
479 'sxc' => 'sxc.gif',
480 'sxw' => 'sxw.gif',
481 'xls' => 'xls.gif',
482 'swf' => 'swf.gif',
483 'swa' => 'flash.gif',
484 'dcr' => 'flash.gif',
485 'wav' => 'wav.gif',
486 'mp3' => 'mp3.gif',
487 'avi' => 'avi.gif',
488 'au' => 'au.gif',
489 'mov' => 'mov.gif',
490 '3ds' => '3ds.gif',
491 'csv' => 'csv.gif',
492 'ico' => 'ico.gif',
493 'max' => 'max.gif',
494 'ps' => 'ps.gif',
495 'tmpl' => 'tmpl.gif',
496 'xls' => 'xls.gif',
497 'fh3' => 'fh3.gif',
498 'inc' => 'inc.gif',
499 'mid' => 'mid.gif',
500 'psd' => 'psd.gif',
501 'xml' => 'xml.gif',
502 'rtf' => 'rtf.gif',
503 't3x' => 't3x.gif',
504 't3d' => 't3d.gif',
505 'cdr' => 'cdr.gif',
506 'dtd' => 'dtd.gif',
507 'sgml' => 'sgml.gif',
508 'ani' => 'ani.gif',
509 'css' => 'css.gif',
510 'eps' => 'eps.gif',
511 'js' => 'js.gif',
512 'wrl' => 'wrl.gif',
513 'default' => 'default.gif'
514 );
515
516
517
518
519 ?>