* Added Latvian, Japanese and Vietnamese languages
[Packages/TYPO3.CMS.git] / t3lib / stddb / tbl_be.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2004 Kasper Skaarhoj (kasper@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 dynamic configuation of the fields in the core tables of TYPO3: be_users, be_groups and sys_filemounts
29 *
30 * $Id$
31 * Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj
32 *
33 * @author Kasper Skaarhoj <kasper@typo3.com>
34 * @see tables.php, tables.sql
35 */
36
37
38
39
40
41
42 /**
43 * Backend users - Those who login into the TYPO3 administration backend
44 */
45 $TCA['be_users'] = Array (
46 'ctrl' => $TCA['be_users']['ctrl'],
47 'interface' => Array (
48 'showRecordFieldList' => 'username,usergroup,db_mountpoints,file_mountpoints,admin,options,fileoper_perms,userMods,lockToDomain,realName,email,disable,starttime,endtime'
49 ),
50 'columns' => Array (
51 'username' => Array (
52 'label' => 'Username:',
53 'config' => Array (
54 'type' => 'input',
55 'size' => '20',
56 'max' => '20',
57 'eval' => 'nospace,lower,unique,required'
58 )
59 ),
60 'password' => Array (
61 'label' => 'Password:',
62 'config' => Array (
63 'type' => 'input',
64 'size' => '20',
65 'max' => '40',
66 'eval' => 'required,md5,password'
67 )
68 ),
69 'usergroup' => Array (
70 'label' => 'Group:',
71 'config' => Array (
72 'type' => 'select',
73 'foreign_table' => 'be_groups',
74 'foreign_table_where' => 'ORDER BY be_groups.title',
75 'size' => '5',
76 'maxitems' => '20',
77 'wizards' => Array(
78 '_PADDING' => 1,
79 '_VERTICAL' => 1,
80 'edit' => Array(
81 'type' => 'popup',
82 'title' => 'Edit usergroup',
83 'script' => 'wizard_edit.php',
84 'popup_onlyOpenIfSelected' => 1,
85 'icon' => 'edit2.gif',
86 'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
87 ),
88 'add' => Array(
89 'type' => 'script',
90 'title' => 'Create new group',
91 'icon' => 'add.gif',
92 'params' => Array(
93 'table'=>'be_groups',
94 'pid' => '0',
95 'setValue' => 'prepend'
96 ),
97 'script' => 'wizard_add.php',
98 ),
99 'list' => Array(
100 'type' => 'script',
101 'title' => 'List groups',
102 'icon' => 'list.gif',
103 'params' => Array(
104 'table'=>'be_groups',
105 'pid' => '0',
106 ),
107 'script' => 'wizard_list.php',
108 )
109 )
110 )
111 ),
112 'lockToDomain' => Array (
113 'label' => 'Lock to domain:',
114 'config' => Array (
115 'type' => 'input',
116 'size' => '20',
117 'eval' => 'trim',
118 'max' => '50',
119 'checkbox' => ''
120 )
121 ),
122 'db_mountpoints' => Array (
123 'label' => 'DB Mounts:',
124 'config' => Array (
125 'type' => 'group',
126 'internal_type' => 'db',
127 'allowed' => 'pages',
128 'size' => '3',
129 'maxitems' => '10',
130 'autoSizeMax' => 10,
131 'show_thumbs' => '1'
132 )
133 ),
134 'file_mountpoints' => Array (
135 'label' => 'File Mounts:',
136 'config' => Array (
137 'type' => 'select',
138 'foreign_table' => 'sys_filemounts',
139 'foreign_table_where' => ' AND sys_filemounts.pid=0 ORDER BY sys_filemounts.title',
140 # 'type' => 'group',
141 # 'internal_type' => 'db',
142 # 'allowed' => 'sys_filemounts',
143 'size' => '3',
144 'maxitems' => '10',
145 'autoSizeMax' => 10,
146 'show_thumbs' => '1',
147 'wizards' => Array(
148 '_PADDING' => 1,
149 '_VERTICAL' => 1,
150 'edit' => Array(
151 'type' => 'popup',
152 'title' => 'Edit filemount',
153 'script' => 'wizard_edit.php',
154 'icon' => 'edit2.gif',
155 'popup_onlyOpenIfSelected' => 1,
156 'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
157 ),
158 'add' => Array(
159 'type' => 'script',
160 'title' => 'Create new filemount',
161 'icon' => 'add.gif',
162 'params' => Array(
163 'table'=>'sys_filemounts',
164 'pid' => '0',
165 'setValue' => 'prepend'
166 ),
167 'script' => 'wizard_add.php',
168 ),
169 'list' => Array(
170 'type' => 'script',
171 'title' => 'List filemounts',
172 'icon' => 'list.gif',
173 'params' => Array(
174 'table'=>'sys_filemounts',
175 'pid' => '0',
176 ),
177 'script' => 'wizard_list.php',
178 )
179 )
180 )
181 ),
182 'email' => Array (
183 'label' => 'Email:',
184 'config' => Array (
185 'type' => 'input',
186 'size' => '20',
187 'eval' => 'trim',
188 'max' => '80'
189 )
190 ),
191 'realName' => Array (
192 'label' => 'Name:',
193 'config' => Array (
194 'type' => 'input',
195 'size' => '20',
196 'eval' => 'trim',
197 'max' => '80'
198 )
199 ),
200 'disable' => Array (
201 'label' => 'Disable:',
202 'config' => Array (
203 'type' => 'check'
204 )
205 ),
206 'disableIPlock' => Array (
207 'label' => 'Disable IP lock for user:',
208 'config' => Array (
209 'type' => 'check'
210 )
211 ),
212 'admin' => Array (
213 'label' => 'Admin(!):',
214 'config' => Array (
215 'type' => 'check',
216 'default' => '0'
217 )
218 ),
219 'options' => Array (
220 'label' => 'Mount from groups:',
221 'config' => Array (
222 'type' => 'check',
223 'items' => Array (
224 Array('DB Mounts', 0),
225 Array('File Mounts', 0)
226 ),
227 'default' => '3'
228 )
229 ),
230 'fileoper_perms' => Array (
231 'label' => 'Fileoperation permissions:',
232 'config' => Array (
233 'type' => 'check',
234 'items' => Array (
235 Array('Files: Upload,Copy,Move,Delete,Rename,New,Edit', 0),
236 Array('Files: Unzip', 0),
237 Array('Directory: Move,Delete,Rename,New', 0),
238 Array('Directory: Copy', 0),
239 Array('Directory: Delete recursively (rm -Rf)', 0)
240 ),
241 'default' => '7'
242 )
243 ),
244 'starttime' => Array (
245 'label' => 'Start:',
246 'config' => Array (
247 'type' => 'input',
248 'size' => '8',
249 'max' => '20',
250 'eval' => 'date',
251 'default' => '0',
252 'checkbox' => '0'
253 )
254 ),
255 'endtime' => Array (
256 'label' => 'Stop:',
257 'config' => Array (
258 'type' => 'input',
259 'size' => '8',
260 'max' => '20',
261 'eval' => 'date',
262 'checkbox' => '0',
263 'default' => '0',
264 'range' => Array (
265 'upper' => mktime(0,0,0,12,31,2020),
266 'lower' => mktime(0,0,0,date('m')-1,date('d'),date('Y'))
267 )
268 )
269 ),
270 'lang' => Array (
271 'label' => 'Default Language:',
272 'config' => Array (
273 'type' => 'select',
274 'items' => Array (
275 Array('English', ''),
276 Array('Danish', 'dk'),
277 Array('German', 'de'),
278 Array('Norwegian', 'no'),
279 Array('Italian', 'it'),
280 Array('French', 'fr'),
281 Array('Spanish', 'es'),
282 Array('Dutch', 'nl'),
283 Array('Czech', 'cz'),
284 Array('Polish', 'pl'),
285 Array('Slovenian', 'si'),
286 Array('Finnish', 'fi'),
287 Array('Turkish', 'tr'),
288 Array('Swedish', 'se'),
289 Array('Portuguese', 'pt'),
290 Array('Russian', 'ru'),
291 Array('Romanian', 'ro'),
292 Array('Chinese (Simpl)', 'ch'),
293 Array('Slovak', 'sk'),
294 Array('Lithuanian', 'lt'),
295 Array('Icelandic', 'is'),
296 Array('Croatian', 'hr'),
297 Array('Hungarian', 'hu'),
298 Array('Greenlandic', 'gl'),
299 Array('Thai', 'th'),
300 Array('Greek', 'gr'),
301 Array('Chinese (Trad)', 'hk'),
302 Array('Basque', 'eu'),
303 Array('Bulgarian', 'bg'),
304 Array('Brazilian Portuguese', 'br'),
305 Array('Estonian', 'et'),
306 Array('Arabic', 'ar'),
307 Array('Hebrew', 'he'),
308 Array('Ukrainian', 'ua'),
309 Array('Latvian', 'lv'),
310 Array('Japanese', 'jp'),
311 Array('Vietnamese', 'vn'),
312 )
313 )
314 ),
315 'userMods' => Array (
316 'label' => 'Modules:',
317 'config' => Array (
318 'type' => 'select',
319 'special' => 'modListUser',
320 'size' => '5',
321 'autoSizeMax' => 50,
322 'maxitems' => '15'
323 )
324 ),
325 'TSconfig' => Array (
326 'label' => 'TSconfig:',
327 'config' => Array (
328 'type' => 'text',
329 'cols' => '40',
330 'rows' => '5',
331 'wizards' => Array(
332 '_PADDING' => 4,
333 '0' => Array(
334 'type' => t3lib_extMgm::isLoaded('tsconfig_help')?'popup':'',
335 'title' => 'TSconfig QuickReference',
336 'script' => 'wizard_tsconfig.php?mode=beuser',
337 'icon' => 'wizard_tsconfig.gif',
338 'JSopenParams' => 'height=500,width=780,status=0,menubar=0,scrollbars=1',
339 )
340 )
341 )
342 ),
343 'createdByAction' => Array('config'=>array('type'=>'passthrough'))
344 ),
345 'types' => Array (
346 '0' => Array('showitem' => 'username;;;;2-2-2, password, usergroup, lockToDomain, disableIPlock, admin;;;;5-5-5, realName;;;;3-3-3, email, lang, userMods;;;;4-4-4, options, db_mountpoints, file_mountpoints, fileoper_perms, --div--, TSconfig;;;;5-5-5'),
347 '1' => Array('showitem' => 'username;;;;2-2-2, password, usergroup, disableIPlock, admin;;;;5-5-5, realName;;;;3-3-3, email, lang, options;;;;4-4-4, db_mountpoints, file_mountpoints, fileoper_perms, --div--, TSconfig;;;;5-5-5')
348 ),
349 'palettes' => Array (
350 '1' => Array('showitem' => 'disable, starttime, endtime')
351 )
352 );
353
354
355
356 /**
357 * Backend usergroups - Much permission criterias are based on membership of backend groups.
358 */
359 $TCA['be_groups'] = Array (
360 'ctrl' => $TCA['be_groups']['ctrl'],
361 'interface' => Array (
362 'showRecordFieldList' => 'title,db_mountpoints,file_mountpoints,inc_access_lists,tables_select,tables_modify,pagetypes_select,non_exclude_fields,groupMods,lockToDomain,description'
363 ),
364 'columns' => Array (
365 'title' => Array (
366 'label' => 'Grouptitle:',
367 'config' => Array (
368 'type' => 'input',
369 'size' => '25',
370 'max' => '20',
371 'eval' => 'trim,required'
372 )
373 ),
374 'db_mountpoints' => Array (
375 'label' => 'DB Mounts:',
376 'config' => Array (
377 'type' => 'group',
378 'internal_type' => 'db',
379 'allowed' => 'pages',
380 'size' => '3',
381 'maxitems' => '10',
382 'autoSizeMax' => 10,
383 'show_thumbs' => '1'
384 )
385 ),
386 'file_mountpoints' => Array (
387 'label' => 'File Mounts:',
388 'config' => Array (
389 'type' => 'select',
390 'foreign_table' => 'sys_filemounts',
391 'foreign_table_where' => ' AND sys_filemounts.pid=0 ORDER BY sys_filemounts.title',
392 # 'type' => 'group',
393 # 'internal_type' => 'db',
394 # 'allowed' => 'sys_filemounts',
395 'size' => '3',
396 'maxitems' => '10',
397 'autoSizeMax' => 10,
398 'show_thumbs' => '1',
399 'wizards' => Array(
400 '_PADDING' => 1,
401 '_VERTICAL' => 1,
402 'edit' => Array(
403 'type' => 'popup',
404 'title' => 'Edit filemount',
405 'script' => 'wizard_edit.php',
406 'popup_onlyOpenIfSelected' => 1,
407 'icon' => 'edit2.gif',
408 'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
409 ),
410 'add' => Array(
411 'type' => 'script',
412 'title' => 'Create new filemount',
413 'icon' => 'add.gif',
414 'params' => Array(
415 'table'=>'sys_filemounts',
416 'pid' => '0',
417 'setValue' => 'prepend'
418 ),
419 'script' => 'wizard_add.php',
420 ),
421 'list' => Array(
422 'type' => 'script',
423 'title' => 'List filemounts',
424 'icon' => 'list.gif',
425 'params' => Array(
426 'table'=>'sys_filemounts',
427 'pid' => '0',
428 ),
429 'script' => 'wizard_list.php',
430 )
431 )
432 )
433 ),
434 'pagetypes_select' => Array (
435 'label' => 'Page types:',
436 'config' => Array (
437 'type' => 'select',
438 'special' => 'pagetypes',
439 'size' => '5',
440 'autoSizeMax' => 50,
441 'maxitems' => '20'
442 )
443 ),
444 'tables_modify' => Array (
445 'label' => 'Tables (modify):',
446 'config' => Array (
447 'type' => 'select',
448 'special' => 'tables',
449 'size' => '5',
450 'autoSizeMax' => 50,
451 'maxitems' => '20'
452 )
453 ),
454 'tables_select' => Array (
455 'label' => 'Tables (listing):',
456 'config' => Array (
457 'type' => 'select',
458 'special' => 'tables',
459 'size' => '5',
460 'autoSizeMax' => 50,
461 'maxitems' => '20'
462 )
463 ),
464 'non_exclude_fields' => Array (
465 'label' => 'Allowed excludefields:',
466 'config' => Array (
467 'type' => 'select',
468 'special' => 'exclude',
469 'size' => '25',
470 'maxitems' => '300',
471 'autoSizeMax' => 50,
472 )
473 ),
474 'hidden' => Array (
475 'label' => 'Disable:',
476 'config' => Array (
477 'type' => 'check',
478 'default' => '0'
479 )
480 ),
481 'lockToDomain' => Array (
482 'label' => 'Lock to domain:',
483 'config' => Array (
484 'type' => 'input',
485 'size' => '20',
486 'eval' => 'trim',
487 'max' => '50',
488 'checkbox' => ''
489 )
490 ),
491 'groupMods' => Array (
492 'label' => 'Modules:',
493 'config' => Array (
494 'type' => 'select',
495 'special' => 'modListGroup',
496 'size' => '5',
497 'autoSizeMax' => 50,
498 'maxitems' => '15'
499 )
500 ),
501 'inc_access_lists' => Array (
502 'label' => 'Include Access Lists:',
503 'config' => Array (
504 'type' => 'check',
505 'default' => '0'
506 )
507 ),
508 'description' => Array (
509 'label' => 'Description:',
510 'config' => Array (
511 'type' => 'text',
512 'rows' => 5,
513 'cols' => 30
514 )
515 ),
516 'TSconfig' => Array (
517 'label' => 'TSconfig:',
518 'config' => Array (
519 'type' => 'text',
520 'cols' => '40',
521 'rows' => '5',
522 'wizards' => Array(
523 '_PADDING' => 4,
524 '0' => Array(
525 'type' => t3lib_extMgm::isLoaded('tsconfig_help')?'popup':'',
526 'title' => 'TSconfig QuickReference',
527 'script' => 'wizard_tsconfig.php?mode=beuser',
528 'icon' => 'wizard_tsconfig.gif',
529 'JSopenParams' => 'height=500,width=780,status=0,menubar=0,scrollbars=1',
530 )
531 )
532 )
533 ),
534 'hide_in_lists' => Array (
535 'label' => 'Hide in lists:',
536 'config' => Array (
537 'type' => 'check',
538 'default' => 0
539 )
540 ),
541 'subgroup' => Array (
542 'label' => 'Sub Groups:',
543 'config' => Array (
544 'type' => 'select',
545 'foreign_table' => 'be_groups',
546 'foreign_table_where' => 'ORDER BY be_groups.title',
547 'size' => '5',
548 'autoSizeMax' => 50,
549 'maxitems' => '20'
550 )
551 )
552 ),
553 'types' => Array (
554 '0' => Array('showitem' => 'hidden;;;;1-1-1,title;;;;2-2-2, lockToDomain, --div--, inc_access_lists;;;;3-3-3, db_mountpoints;;;;4-4-4,file_mountpoints,hide_in_lists,subgroup,description, --div--, TSconfig;;;;5-5-5'),
555 '1' => Array('showitem' => 'hidden;;;;1-1-1,title;;;;2-2-2, lockToDomain, --div--, inc_access_lists;;;;3-3-3, groupMods, tables_select, tables_modify, pagetypes_select, non_exclude_fields, --div--, db_mountpoints;;;;4-4-4,file_mountpoints,hide_in_lists,subgroup,description, --div--, TSconfig;;;;5-5-5')
556 )
557 );
558
559
560
561 /**
562 * System filemounts - Defines filepaths on the server which can be mounted for users so they can upload and manage files online by eg. the Filelist module
563 */
564 $TCA['sys_filemounts'] = Array (
565 'ctrl' => $TCA['sys_filemounts']['ctrl'],
566 'interface' => Array (
567 'showRecordFieldList' => 'title,hidden,path,base'
568 ),
569 'columns' => Array (
570 'title' => Array (
571 'label' => 'LABEL:',
572 'config' => Array (
573 'type' => 'input',
574 'size' => '20',
575 'max' => '30',
576 'eval' => 'required,trim'
577 )
578 ),
579 'path' => Array (
580 'label' => 'PATH:',
581 'config' => Array (
582 'type' => 'input',
583 'size' => '40',
584 'max' => '120',
585 'eval' => 'required,trim'
586 )
587 ),
588 'hidden' => Array (
589 'label' => 'Disable:',
590 'config' => Array (
591 'type' => 'check'
592 )
593 ),
594 'base' => Array (
595 'label' => 'BASE',
596 'config' => Array (
597 'type' => 'radio',
598 'items' => Array (
599 Array('absolute (root) / ', 0),
600 Array('relative ../fileadmin/', 1)
601 ),
602 'default' => 0
603 )
604 )
605 ),
606 'types' => Array (
607 '0' => Array('showitem' => 'hidden;;;;1-1-1,title;;;;3-3-3,path,base')
608 )
609 );
610 ?>