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