removed new line at end of file
[Packages/TYPO3.CMS.git] / t3lib / stddb / tables.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2005 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 * @deprecated
84 */
85 $ICON_TYPES = Array();
86
87
88 /**
89 * Commonly used language labels which can be used in the $TCA array and elsewhere.
90 * Obsolete - just use the values of each entry directly.
91 *
92 * @deprecated
93 */
94 $LANG_GENERAL_LABELS = array(
95 'endtime' => 'LLL:EXT:lang/locallang_general.php:LGL.endtime',
96 'hidden' => 'LLL:EXT:lang/locallang_general.php:LGL.hidden',
97 'starttime' => 'LLL:EXT:lang/locallang_general.php:LGL.starttime',
98 'fe_group' => 'LLL:EXT:lang/locallang_general.php:LGL.fe_group',
99 'hide_at_login' => 'LLL:EXT:lang/locallang_general.php:LGL.hide_at_login',
100 'any_login' => 'LLL:EXT:lang/locallang_general.php:LGL.any_login',
101 'usergroups' => 'LLL:EXT:lang/locallang_general.php:LGL.usergroups',
102 );
103
104
105
106
107
108
109
110
111
112
113
114
115 /**
116 * $TCA:
117 * This array configures TYPO3 to work with the tables from the database by assigning meta information about data types, relations etc.
118 * The global variable $TCA will contain the information needed to recognize and render each table in the backend
119 * See documentation 'Inside TYPO3' for the syntax and list of required tables/fields!
120 *
121 * 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.
122 * The SQL definitions of these tables (and some more which are not defined in $TCA) is found in the file "tables.sql"
123 * 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"
124 *
125 * 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]
126 * 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
127 */
128 $TCA = array();
129
130 /**
131 * Table "pages":
132 * The mandatory pages table. The backbone of the TYPO3 page tree structure.
133 * All other records configured in $TCA must have a field, "pid", which relates the record to a page record's "uid" field.
134 * Must be COMPLETELY configured in tables.php
135 */
136 $TCA['pages'] = Array (
137 'ctrl' => Array (
138 'label' => 'title',
139 'tstamp' => 'tstamp',
140 'sortby' => 'sorting',
141 'title' => 'LLL:EXT:lang/locallang_tca.php:pages',
142 'type' => 'doktype',
143 'versioningWS' => 2,
144 'origUid' => 't3_origuid',
145 'delete' => 'deleted',
146 'crdate' => 'crdate',
147 'hideAtCopy' => 1,
148 'prependAtCopy' => 'LLL:EXT:lang/locallang_general.php:LGL.prependAtCopy',
149 'cruser_id' => 'cruser_id',
150 'editlock' => 'editlock',
151 'useColumnsForDefaultValues' => 'doktype'
152 ),
153 'interface' => Array (
154 'showRecordFieldList' => 'doktype,title',
155 'maxDBListItems' => 30,
156 'maxSingleDBListItems' => 50
157 ),
158 'columns' => Array (
159 'doktype' => Array (
160 'exclude' => 1,
161 'label' => 'LLL:EXT:lang/locallang_general.php:LGL.type',
162 'config' => Array (
163 'type' => 'select',
164 'items' => Array (
165 array('LLL:EXT:lang/locallang_tca.php:doktype.I.0', '1', 'i/pages.gif'),
166 array('LLL:EXT:lang/locallang_tca.php:doktype.I.1', '254', 'i/sysf.gif'),
167 array('LLL:EXT:lang/locallang_tca.php:doktype.I.2', '255', 'i/recycler.gif')
168 ),
169 'default' => '1',
170 'iconsInOptionTags' => 1,
171 'noIconsBelowSelect' => 1,
172 )
173 ),
174 'title' => Array (
175 'label' => 'LLL:EXT:lang/locallang_tca.php:title',
176 'config' => Array (
177 'type' => 'input',
178 'size' => '30',
179 'max' => '255',
180 'eval' => 'required'
181 )
182 ),
183 'TSconfig' => Array (
184 'exclude' => 1,
185 'label' => 'TSconfig:',
186 'config' => Array (
187 'type' => 'text',
188 'cols' => '40',
189 'rows' => '5',
190 'wizards' => Array(
191 '_PADDING' => 4,
192 '0' => Array(
193 'type' => t3lib_extMgm::isLoaded('tsconfig_help')?'popup':'',
194 'title' => 'TSconfig QuickReference',
195 'script' => 'wizard_tsconfig.php?mode=page',
196 'icon' => 'wizard_tsconfig.gif',
197 'JSopenParams' => 'height=500,width=780,status=0,menubar=0,scrollbars=1',
198 )
199 ),
200 'softref' => 'TSconfig'
201 ),
202 'defaultExtras' => 'fixed-font : enable-tab',
203 ),
204 'php_tree_stop' => Array (
205 'exclude' => 1,
206 'label' => 'LLL:EXT:lang/locallang_tca.php:php_tree_stop',
207 'config' => Array (
208 'type' => 'check'
209 )
210 ),
211 'is_siteroot' => Array (
212 'exclude' => 1,
213 'label' => 'LLL:EXT:lang/locallang_tca.php:is_siteroot',
214 'config' => Array (
215 'type' => 'check'
216 )
217 ),
218 'storage_pid' => Array (
219 'exclude' => 1,
220 'label' => 'LLL:EXT:lang/locallang_tca.php:storage_pid',
221 'config' => Array (
222 'type' => 'group',
223 'internal_type' => 'db',
224 'allowed' => 'pages',
225 'size' => '1',
226 'maxitems' => '1',
227 'minitems' => '0',
228 'show_thumbs' => '1'
229 )
230 ),
231 'tx_impexp_origuid' => Array('config'=>array('type'=>'passthrough')),
232 't3ver_label' => Array (
233 'label' => 'LLL:EXT:lang/locallang_general.php:LGL.versionLabel',
234 'config' => Array (
235 'type' => 'input',
236 'size' => '30',
237 'max' => '30',
238 )
239 ),
240 'editlock' => Array (
241 'exclude' => 1,
242 'label' => 'LLL:EXT:lang/locallang_tca.php:editlock',
243 'config' => Array (
244 'type' => 'check'
245 )
246 ),
247 ),
248 'types' => Array (
249 '1' => Array('showitem' => 'doktype, title, TSconfig;;6;nowrap, storage_pid;;7'),
250 '254' => Array('showitem' => 'doktype, title;LLL:EXT:lang/locallang_general.php:LGL.title, TSconfig;;6;nowrap, storage_pid;;7'),
251 '255' => Array('showitem' => 'doktype, title, TSconfig;;6;nowrap, storage_pid;;7')
252 ),
253 'palettes' => Array (
254 '6' => Array('showitem' => 'php_tree_stop, editlock'),
255 '7' => Array('showitem' => 'is_siteroot')
256 )
257 );
258
259 /**
260 * Table "be_users":
261 * Backend Users for TYPO3.
262 * This is only the 'header' part (ctrl). The full configuration is found in t3lib/stddb/tbl_be.php
263 */
264 $TCA['be_users'] = Array (
265 'ctrl' => Array (
266 'label' => 'username',
267 'tstamp' => 'tstamp',
268 'title' => 'LLL:EXT:lang/locallang_tca.php:be_users',
269 'crdate' => 'crdate',
270 'cruser_id' => 'cruser_id',
271 'delete' => 'deleted',
272 'adminOnly' => 1, // Only admin users can edit
273 'rootLevel' => 1,
274 'default_sortby' => 'ORDER BY admin, username',
275 'enablecolumns' => Array (
276 'disabled' => 'disable',
277 'starttime' => 'starttime',
278 'endtime' => 'endtime'
279 ),
280 'type' => 'admin',
281 'typeicon_column' => 'admin',
282 'typeicons' => Array (
283 '0' => 'be_users.gif',
284 '1' => 'be_users_admin.gif'
285 ),
286 'mainpalette' => '1',
287 'useColumnsForDefaultValues' => 'usergroup,lockToDomain,options,db_mountpoints,file_mountpoints,fileoper_perms,userMods',
288 'dividers2tabs' => true,
289 'dynamicConfigFile' => 'T3LIB:tbl_be.php',
290 'versioningWS_alwaysAllowLiveEdit' => TRUE
291 )
292 );
293
294 /**
295 * Table "be_groups":
296 * Backend Usergroups for TYPO3.
297 * This is only the 'header' part (ctrl). The full configuration is found in t3lib/stddb/tbl_be.php
298 */
299 $TCA['be_groups'] = Array (
300 'ctrl' => Array (
301 'label' => 'title',
302 'tstamp' => 'tstamp',
303 'crdate' => 'crdate',
304 'cruser_id' => 'cruser_id',
305 'delete' => 'deleted',
306 'default_sortby' => 'ORDER BY title',
307 'prependAtCopy' => 'LLL:EXT:lang/locallang_general.php:LGL.prependAtCopy',
308 'adminOnly' => 1,
309 'rootLevel' => 1,
310 'type' => 'inc_access_lists',
311 'typeicon_column' => 'inc_access_lists',
312 'typeicons' => Array (
313 '1' => 'be_groups_lists.gif'
314 ),
315 'enablecolumns' => Array (
316 'disabled' => 'hidden'
317 ),
318 'title' => 'LLL:EXT:lang/locallang_tca.php:be_groups',
319 'useColumnsForDefaultValues' => 'lockToDomain',
320 'dividers2tabs' => true,
321 'dynamicConfigFile' => 'T3LIB:tbl_be.php',
322 'versioningWS_alwaysAllowLiveEdit' => TRUE
323 )
324 );
325
326 /**
327 * Table "sys_filemounts":
328 * Defines filepaths on the server which can be mounted for users so they can upload and manage files online by eg. the Filelist module
329 * This is only the 'header' part (ctrl). The full configuration is found in t3lib/stddb/tbl_be.php
330 */
331 $TCA['sys_filemounts'] = Array (
332 'ctrl' => Array (
333 'label' => 'title',
334 'tstamp' => 'tstamp',
335 'prependAtCopy' => 'LLL:EXT:lang/locallang_general.php:LGL.prependAtCopy',
336 'title' => 'LLL:EXT:lang/locallang_tca.php:sys_filemounts',
337 'adminOnly' => 1,
338 'rootLevel' => 1,
339 'delete' => 'deleted',
340 'enablecolumns' => Array (
341 'disabled' => 'hidden'
342 ),
343 'iconfile' => '_icon_ftp.gif',
344 'useColumnsForDefaultValues' => 'path,base',
345 'dynamicConfigFile' => 'T3LIB:tbl_be.php',
346 'versioningWS_alwaysAllowLiveEdit' => TRUE
347 )
348 );
349
350 /**
351 * Table "sys_filemounts":
352 * Defines filepaths on the server which can be mounted for users so they can upload and manage files online by eg. the Filelist module
353 * This is only the 'header' part (ctrl). The full configuration is found in t3lib/stddb/tbl_be.php
354 */
355 $TCA['sys_workspace'] = Array (
356 'ctrl' => Array (
357 'label' => 'title',
358 'tstamp' => 'tstamp',
359 'title' => 'LLL:EXT:lang/locallang_tca.php:sys_workspace',
360 'adminOnly' => 1,
361 'rootLevel' => 1,
362 'delete' => 'deleted',
363 'iconfile' => 'sys_workspace.png',
364 'dynamicConfigFile' => 'T3LIB:tbl_be.php',
365 'versioningWS_alwaysAllowLiveEdit' => 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 'php' => 'php3.gif',
470 'ttf' => 'ttf.gif',
471 'pcx' => 'pcx.gif',
472 'png' => 'png.gif',
473 'tga' => 'tga.gif',
474 'class' => 'java.gif',
475 'sxc' => 'sxc.gif',
476 'sxw' => 'sxw.gif',
477 'xls' => 'xls.gif',
478 'swf' => 'swf.gif',
479 'swa' => 'flash.gif',
480 'dcr' => 'flash.gif',
481 'wav' => 'wav.gif',
482 'mp3' => 'mp3.gif',
483 'avi' => 'avi.gif',
484 'au' => 'au.gif',
485 'mov' => 'mov.gif',
486 '3ds' => '3ds.gif',
487 'csv' => 'csv.gif',
488 'ico' => 'ico.gif',
489 'max' => 'max.gif',
490 'ps' => 'ps.gif',
491 'tmpl' => 'tmpl.gif',
492 'xls' => 'xls.gif',
493 'fh3' => 'fh3.gif',
494 'inc' => 'inc.gif',
495 'mid' => 'mid.gif',
496 'psd' => 'psd.gif',
497 'xml' => 'xml.gif',
498 'rtf' => 'rtf.gif',
499 't3x' => 't3x.gif',
500 't3d' => 't3d.gif',
501 'cdr' => 'cdr.gif',
502 'dtd' => 'dtd.gif',
503 'sgml' => 'sgml.gif',
504 'ani' => 'ani.gif',
505 'css' => 'css.gif',
506 'eps' => 'eps.gif',
507 'js' => 'js.gif',
508 'wrl' => 'wrl.gif',
509 'default' => 'default.gif'
510 );
511
512
513
514
515 ?>