Tiny bug with date function in t3lib_befunc. Casted timestamp to integer.
[Packages/TYPO3.CMS.git] / t3lib / stddb / tables.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2009 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 'wizards' => array(
229 'suggest' => array(
230 'type' => 'suggest',
231 ),
232 ),
233 )
234 ),
235 'tx_impexp_origuid' => array('config'=>array('type'=>'passthrough')),
236 't3ver_label' => array(
237 'label' => 'LLL:EXT:lang/locallang_general.php:LGL.versionLabel',
238 'config' => array(
239 'type' => 'input',
240 'size' => '30',
241 'max' => '255',
242 )
243 ),
244 'editlock' => array(
245 'exclude' => 1,
246 'label' => 'LLL:EXT:lang/locallang_tca.php:editlock',
247 'config' => array(
248 'type' => 'check'
249 )
250 ),
251 ),
252 'types' => array(
253 '1' => array('showitem' => 'doktype, title, TSconfig;;6;nowrap, storage_pid;;7'),
254 '254' => array('showitem' => 'doktype, title;LLL:EXT:lang/locallang_general.php:LGL.title, TSconfig;;6;nowrap, storage_pid;;7'),
255 '255' => array('showitem' => 'doktype, title, TSconfig;;6;nowrap, storage_pid;;7')
256 ),
257 'palettes' => array(
258 '6' => array('showitem' => 'php_tree_stop, editlock'),
259 '7' => array('showitem' => 'is_siteroot')
260 )
261 );
262
263 /**
264 * Table "be_users":
265 * Backend Users for TYPO3.
266 * This is only the 'header' part (ctrl). The full configuration is found in t3lib/stddb/tbl_be.php
267 */
268 $TCA['be_users'] = array(
269 'ctrl' => array(
270 'label' => 'username',
271 'tstamp' => 'tstamp',
272 'title' => 'LLL:EXT:lang/locallang_tca.php:be_users',
273 'crdate' => 'crdate',
274 'cruser_id' => 'cruser_id',
275 'delete' => 'deleted',
276 'adminOnly' => 1, // Only admin users can edit
277 'rootLevel' => 1,
278 'default_sortby' => 'ORDER BY admin, username',
279 'enablecolumns' => array(
280 'disabled' => 'disable',
281 'starttime' => 'starttime',
282 'endtime' => 'endtime'
283 ),
284 'type' => 'admin',
285 'typeicon_column' => 'admin',
286 'typeicons' => array(
287 '0' => 'be_users.gif',
288 '1' => 'be_users_admin.gif'
289 ),
290 'mainpalette' => '1',
291 'useColumnsForDefaultValues' => 'usergroup,lockToDomain,options,db_mountpoints,file_mountpoints,fileoper_perms,userMods',
292 'dividers2tabs' => true,
293 'dynamicConfigFile' => 'T3LIB:tbl_be.php',
294 'versioningWS_alwaysAllowLiveEdit' => TRUE
295 )
296 );
297
298 /**
299 * Table "be_groups":
300 * Backend Usergroups for TYPO3.
301 * This is only the 'header' part (ctrl). The full configuration is found in t3lib/stddb/tbl_be.php
302 */
303 $TCA['be_groups'] = array(
304 'ctrl' => array(
305 'label' => 'title',
306 'tstamp' => 'tstamp',
307 'crdate' => 'crdate',
308 'cruser_id' => 'cruser_id',
309 'delete' => 'deleted',
310 'default_sortby' => 'ORDER BY title',
311 'prependAtCopy' => 'LLL:EXT:lang/locallang_general.php:LGL.prependAtCopy',
312 'adminOnly' => 1,
313 'rootLevel' => 1,
314 'type' => 'inc_access_lists',
315 'typeicon_column' => 'inc_access_lists',
316 'typeicons' => array(
317 '1' => 'be_groups_lists.gif'
318 ),
319 'enablecolumns' => array(
320 'disabled' => 'hidden'
321 ),
322 'title' => 'LLL:EXT:lang/locallang_tca.php:be_groups',
323 'useColumnsForDefaultValues' => 'lockToDomain, fileoper_perms',
324 'dividers2tabs' => true,
325 'dynamicConfigFile' => 'T3LIB:tbl_be.php',
326 'versioningWS_alwaysAllowLiveEdit' => TRUE
327 )
328 );
329
330 /**
331 * Table "sys_filemounts":
332 * Defines filepaths on the server which can be mounted for users so they can upload and manage files online by eg. the Filelist module
333 * This is only the 'header' part (ctrl). The full configuration is found in t3lib/stddb/tbl_be.php
334 */
335 $TCA['sys_filemounts'] = array(
336 'ctrl' => array(
337 'label' => 'title',
338 'tstamp' => 'tstamp',
339 'prependAtCopy' => 'LLL:EXT:lang/locallang_general.php:LGL.prependAtCopy',
340 'title' => 'LLL:EXT:lang/locallang_tca.php:sys_filemounts',
341 'adminOnly' => 1,
342 'rootLevel' => 1,
343 'delete' => 'deleted',
344 'enablecolumns' => array(
345 'disabled' => 'hidden'
346 ),
347 'iconfile' => '_icon_ftp.gif',
348 'useColumnsForDefaultValues' => 'path,base',
349 'dynamicConfigFile' => 'T3LIB:tbl_be.php',
350 'versioningWS_alwaysAllowLiveEdit' => TRUE
351 )
352 );
353
354
355 /**
356 * Table "sys_languages":
357 * Defines possible languages used for translation of records in the system
358 * This is only the 'header' part (ctrl). The full configuration is found in t3lib/stddb/tbl_be.php
359 */
360 $TCA['sys_language'] = array(
361 'ctrl' => array(
362 'label' => 'title',
363 'tstamp' => 'tstamp',
364 'default_sortby' => 'ORDER BY title',
365 'title' => 'LLL:EXT:lang/locallang_tca.php:sys_language',
366 'adminOnly' => 1,
367 'rootLevel' => 1,
368 'enablecolumns' => array(
369 'disabled' => 'hidden'
370 ),
371 'dynamicConfigFile' => 'T3LIB:tbl_be.php',
372 'versioningWS_alwaysAllowLiveEdit' => TRUE
373 )
374 );
375
376
377
378
379
380
381
382
383
384
385
386
387 /**
388 * $TBE_MODULES contains the structure of the backend modules as they are arranged in main- and sub-modules.
389 * 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
390 * For information about adding modules to TYPO3 you should consult the documentation found in "Inside TYPO3"
391 */
392 $TBE_MODULES = array(
393 'web' => 'list,info,perm,func',
394 'file' => 'list',
395 'user' => 'ws',
396 'tools' => 'em',
397 'help' => 'about,cshmanual'
398 );
399
400
401 /**
402 * $TBE_STYLES configures backend styles and colors; Basically this contains all the values that can be used to create new skins for TYPO3.
403 * For information about making skins to TYPO3 you should consult the documentation found in "Inside TYPO3"
404 */
405 $TBE_STYLES = array(
406 'colorschemes' => array(
407 '0' => '#E4E0DB,#CBC7C3,#EDE9E5',
408 ),
409 'borderschemes' => array(
410 '0' => array('border:solid 1px black;',5)
411 )
412 );
413
414
415 /**
416 * Setting up $TCA_DESCR - Context Sensitive Help (CSH)
417 * For information about using the CSH API in TYPO3 you should consult the documentation found in "Inside TYPO3"
418 */
419 t3lib_extMgm::addLLrefForTCAdescr('pages','EXT:lang/locallang_csh_pages.xml');
420 t3lib_extMgm::addLLrefForTCAdescr('be_users','EXT:lang/locallang_csh_be_users.xml');
421 t3lib_extMgm::addLLrefForTCAdescr('be_groups','EXT:lang/locallang_csh_be_groups.xml');
422 t3lib_extMgm::addLLrefForTCAdescr('sys_filemounts','EXT:lang/locallang_csh_sysfilem.xml');
423 t3lib_extMgm::addLLrefForTCAdescr('sys_language','EXT:lang/locallang_csh_syslang.xml');
424 t3lib_extMgm::addLLrefForTCAdescr('sys_workspace','EXT:lang/locallang_csh_sysws.xml');
425 t3lib_extMgm::addLLrefForTCAdescr('xMOD_csh_corebe','EXT:lang/locallang_csh_corebe.xml'); // General Core
426 t3lib_extMgm::addLLrefForTCAdescr('_MOD_tools_em','EXT:lang/locallang_csh_em.xml'); // Extension manager
427 t3lib_extMgm::addLLrefForTCAdescr('_MOD_web_info','EXT:lang/locallang_csh_web_info.xml'); // Web > Info
428 t3lib_extMgm::addLLrefForTCAdescr('_MOD_web_func','EXT:lang/locallang_csh_web_func.xml'); // Web > Func
429
430
431 /**
432 * $FILEICONS defines icons for the various file-formats
433 */
434 $FILEICONS = array(
435 'txt' => 'txt.gif',
436 'pdf' => 'pdf.gif',
437 'doc' => 'doc.gif',
438 'ai' => 'ai.gif',
439 'bmp' => 'bmp.gif',
440 'tif' => 'tif.gif',
441 'htm' => 'htm.gif',
442 'html' => 'html.gif',
443 'pcd' => 'pcd.gif',
444 'gif' => 'gif.gif',
445 'jpg' => 'jpg.gif',
446 'jpeg' => 'jpg.gif',
447 'mpg' => 'mpg.gif',
448 'mpeg' => 'mpeg.gif',
449 'exe' => 'exe.gif',
450 'com' => 'exe.gif',
451 'zip' => 'zip.gif',
452 'tgz' => 'zip.gif',
453 'gz' => 'zip.gif',
454 'php3' => 'php3.gif',
455 'php4' => 'php3.gif',
456 'php5' => 'php3.gif',
457 'php6' => 'php3.gif',
458 'php' => 'php3.gif',
459 'ppt' => 'ppt.gif',
460 'ttf' => 'ttf.gif',
461 'pcx' => 'pcx.gif',
462 'png' => 'png.gif',
463 'tga' => 'tga.gif',
464 'class' => 'java.gif',
465 'sxc' => 'sxc.gif',
466 'sxw' => 'sxw.gif',
467 'xls' => 'xls.gif',
468 'swf' => 'swf.gif',
469 'swa' => 'flash.gif',
470 'dcr' => 'flash.gif',
471 'wav' => 'wav.gif',
472 'mp3' => 'mp3.gif',
473 'avi' => 'avi.gif',
474 'au' => 'au.gif',
475 'mov' => 'mov.gif',
476 '3ds' => '3ds.gif',
477 'csv' => 'csv.gif',
478 'ico' => 'ico.gif',
479 'max' => 'max.gif',
480 'ps' => 'ps.gif',
481 'tmpl' => 'tmpl.gif',
482 'xls' => 'xls.gif',
483 'fh3' => 'fh3.gif',
484 'inc' => 'inc.gif',
485 'mid' => 'mid.gif',
486 'psd' => 'psd.gif',
487 'xml' => 'xml.gif',
488 'rtf' => 'rtf.gif',
489 't3x' => 't3x.gif',
490 't3d' => 't3d.gif',
491 'cdr' => 'cdr.gif',
492 'dtd' => 'dtd.gif',
493 'sgml' => 'sgml.gif',
494 'ani' => 'ani.gif',
495 'css' => 'css.gif',
496 'eps' => 'eps.gif',
497 'js' => 'js.gif',
498 'wrl' => 'wrl.gif',
499 'default' => 'default.gif'
500 );
501
502
503
504
505 ?>