954f9f505cd4bb5e8faf4ec7efd3541f9195ea06
[Packages/TYPO3.CMS.git] / typo3 / sysext / filemetadata / Configuration / TCA / Overrides / sys_file_metadata.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 $tca = array(
5 'ctrl' => array(
6 'type' => 'file:type',
7 ),
8 'types' => array(
9 TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => array(
10 'showitem' => '
11 fileinfo, title, description, ranking, keywords,
12 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.accessibility;25,
13 --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
14 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10,
15 fe_groups,
16 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
17 creator, creator_tool, publisher, source, copyright,
18 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40
19 ',
20 ),
21 TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array(
22 'showitem' => '
23 fileinfo, title, description, ranking, keywords,
24 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.accessibility;25,
25 --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
26 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10,
27 fe_groups,
28 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
29 creator, creator_tool, publisher, source, copyright, language,
30 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40
31 ',
32 ),
33 TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array(
34 'showitem' => '
35 fileinfo, title, description, ranking, keywords,
36 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.accessibility;20,
37 --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
38 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10,
39 fe_groups,
40 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
41 creator, creator_tool, publisher, source, copyright, language,
42 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40,
43 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.gps;30,
44 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.content_date;60,
45 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.camera,
46 color_space,
47 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.metrics;50
48 ',
49 ),
50 TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array(
51 'showitem' => '
52 fileinfo, title, description, ranking, keywords,
53 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.accessibility;25,
54 --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
55 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10,
56 fe_groups,
57 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
58 creator, creator_tool, publisher, source, copyright, language,
59 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.content_date;60,
60 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.audio,
61 duration
62 ',
63 ),
64 TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array(
65 'showitem' => '
66 fileinfo, title, description, ranking, keywords,
67 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.accessibility;25,
68 --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
69 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10,
70 fe_groups,
71 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
72 creator, creator_tool, publisher, source, copyright, language,
73 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.content_date;60,
74 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.video,
75 duration
76 ',
77 ),
78 TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array(
79 'showitem' => '
80 fileinfo, title, description, ranking, keywords,
81 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.accessibility;25,
82 --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
83 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10,
84 fe_groups,
85 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
86 creator, creator_tool, publisher, source, copyright, language,
87 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40,
88 pages,
89 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.metrics;50,
90 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.content_date;60
91 ',
92 ),
93 ),
94 'palettes' => array(
95 '10' => array(
96 'showitem' => 'visible, status',
97 ),
98 '20' => array(
99 'showitem' => 'alternative, --linebreak--, caption, --linebreak--, download_name',
100 ),
101 '25' => array(
102 'showitem' => 'caption, --linebreak--, download_name',
103 ),
104 '30' => array(
105 'showitem' => 'latitude, longitude',
106 ),
107 '40' => array(
108 'showitem' => 'location_country, location_region, location_city',
109 ),
110 '50' => array(
111 'showitem' => 'width, height, unit',
112 ),
113 '60' => array(
114 'showitem' => 'content_creation_date, content_modification_date',
115 ),
116 ),
117 'columns' => array(
118 'visible' => array(
119 'exclude' => 1,
120 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.visible',
121 'config' => array(
122 'type' => 'check',
123 'default' => '1'
124 ),
125 ),
126 'status' => array(
127 'exclude' => 1,
128 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status',
129 'config' => array(
130 'type' => 'select',
131 'renderType' => 'selectSingle',
132 'items' => array(
133 array(
134 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status.1',
135 1,
136 'filemetadata-status-1'
137 ),
138 array(
139 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status.2',
140 2,
141 'filemetadata-status-2'
142 ),
143 array(
144 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status.3',
145 3,
146 'filemetadata-status-3'
147 ),
148 ),
149 'showIconTable' => true,
150 ),
151 ),
152 'keywords' => array(
153 'exclude' => 1,
154 'l10n_mode' => 'prefixLangTitle',
155 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.keywords',
156 'config' => array(
157 'type' => 'text',
158 'cols' => '40',
159 'rows' => '3',
160 'placeholder' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:placeholder.keywords'
161 ),
162 ),
163 'caption' => array(
164 'exclude' => 1,
165 'l10n_mode' => 'prefixLangTitle',
166 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.caption',
167 'config' => array(
168 'type' => 'input',
169 'size' => 30,
170 'eval' => 'trim'
171 ),
172 ),
173 'creator_tool' => array(
174 'exclude' => 1,
175 'l10n_mode' => 'exclude',
176 'l10n_display' => 'defaultAsReadonly',
177 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.creator_tool',
178 'config' => array(
179 'type' => 'input',
180 'size' => 20,
181 'eval' => 'trim'
182 ),
183 ),
184 'download_name' => array(
185 'exclude' => 1,
186 'l10n_mode' => 'exclude',
187 'l10n_display' => 'defaultAsReadonly',
188 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.download_name',
189 'config' => array(
190 'type' => 'input',
191 'size' => 30,
192 'eval' => 'trim'
193 ),
194 ),
195 'creator' => array(
196 'exclude' => 1,
197 'l10n_mode' => 'exclude',
198 'l10n_display' => 'defaultAsReadonly',
199 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.creator',
200 'config' => array(
201 'type' => 'input',
202 'size' => 30,
203 'eval' => 'trim'
204 ),
205 ),
206 'publisher' => array(
207 'exclude' => 1,
208 'l10n_mode' => 'exclude',
209 'l10n_display' => 'defaultAsReadonly',
210 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.publisher',
211 'config' => array(
212 'type' => 'input',
213 'size' => 20,
214 'eval' => 'trim'
215 ),
216 ),
217 'source' => array(
218 'exclude' => 1,
219 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.source',
220 'config' => array(
221 'type' => 'input',
222 'size' => 20,
223 'eval' => 'trim'
224 ),
225 ),
226 'copyright' => array(
227 'exclude' => 1,
228 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.copyright',
229 'config' => array(
230 'type' => 'input',
231 'size' => 20,
232 'eval' => 'trim'
233 ),
234 ),
235 'location_country' => array(
236 'exclude' => 1,
237 'l10n_mode' => 'mergeIfNotBlank',
238 'l10n_display' => '',
239 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.location_country',
240 'config' => array(
241 'type' => 'input',
242 'size' => 20,
243 'eval' => 'trim'
244 ),
245 ),
246 'location_region' => array(
247 'exclude' => 1,
248 'l10n_mode' => 'mergeIfNotBlank',
249 'l10n_display' => '',
250 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.location_region',
251 'config' => array(
252 'type' => 'input',
253 'size' => 20,
254 'eval' => 'trim'
255 ),
256 ),
257 'location_city' => array(
258 'exclude' => 1,
259 'l10n_mode' => 'mergeIfNotBlank',
260 'l10n_display' => '',
261 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.location_city',
262 'config' => array(
263 'type' => 'input',
264 'size' => 20,
265 'eval' => 'trim'
266 ),
267 ),
268 'latitude' => array(
269 'exclude' => 1,
270 'l10n_mode' => 'exclude',
271 'l10n_display' => 'defaultAsReadonly',
272 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.latitude',
273 'config' => array(
274 'type' => 'input',
275 'size' => '20',
276 'eval' => 'trim',
277 'max' => '30',
278 'default' => '0.00000000000000'
279 ),
280 ),
281 'longitude' => array(
282 'exclude' => 1,
283 'l10n_mode' => 'exclude',
284 'l10n_display' => 'defaultAsReadonly',
285 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.longitude',
286 'config' => array(
287 'type' => 'input',
288 'size' => '20',
289 'eval' => 'trim',
290 'max' => '30',
291 'default' => '0.00000000000000'
292 ),
293 ),
294 'ranking' => array(
295 'exclude' => 1,
296 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.ranking',
297 'config' => array(
298 'type' => 'select',
299 'renderType' => 'selectSingle',
300 'minitems' => 1,
301 'maxitems' => 1,
302 'items' => array(
303 array(0, 0),
304 array(1, 1),
305 array(2, 2),
306 array(3, 3),
307 array(4, 4),
308 array(5, 5),
309 ),
310 ),
311 ),
312 'content_creation_date' => array(
313 'exclude' => 1,
314 'l10n_mode' => 'exclude',
315 'l10n_display' => 'defaultAsReadonly',
316 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.content_creation_date',
317 'config' => array(
318 'type' => 'input',
319 'size' => 12,
320 'max' => 20,
321 'eval' => 'date',
322 'default' => time()
323 ),
324 ),
325 'content_modification_date' => array(
326 'exclude' => 1,
327 'l10n_mode' => 'exclude',
328 'l10n_display' => 'defaultAsReadonly',
329 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.content_modification_date',
330 'config' => array(
331 'type' => 'input',
332 'size' => 12,
333 'max' => 20,
334 'eval' => 'date',
335 'default' => time()
336 ),
337 ),
338 'note' => array(
339 'exclude' => 1,
340 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.note',
341 'config' => array(
342 'type' => 'text',
343 'cols' => 40,
344 'rows' => 15,
345 'eval' => 'trim'
346 ),
347 ),
348 /*
349 * METRICS ###########################################
350 */
351 'unit' => array(
352 'exclude' => 1,
353 'l10n_mode' => 'exclude',
354 'l10n_display' => 'defaultAsReadonly',
355 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit',
356 'config' => array(
357 'type' => 'select',
358 'renderType' => 'selectSingle',
359 'items' => array(
360 array('', ''),
361 array('LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit.px', 'px'),
362 array('LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit.cm', 'cm'),
363 array('LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit.in', 'in'),
364 array('LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit.mm', 'mm'),
365 array('LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit.m', 'm'),
366 array('LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit.p', 'p'),
367 array('LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit.pt', 'pt')
368 ),
369 'default' => '',
370 'readOnly' => true,
371 ),
372 ),
373 'duration' => array(
374 'exclude' => 1,
375 'l10n_mode' => 'exclude',
376 'l10n_display' => 'defaultAsReadonly',
377 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.duration',
378 'config' => array(
379 'type' => 'input',
380 'size' => '10',
381 'max' => '20',
382 'eval' => 'int',
383 'default' => '0'
384 )
385 ),
386 'color_space' => array(
387 'exclude' => 1,
388 'l10n_mode' => 'exclude',
389 'l10n_display' => 'defaultAsReadonly',
390 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space',
391 'config' => array(
392 'type' => 'select',
393 'renderType' => 'selectSingle',
394 'items' => array(
395 array('', ''),
396 array('LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space.RGB', 'RGB'),
397 array('LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space.sRGB', 'sRGB'),
398 array('LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space.CMYK', 'CMYK'),
399 array('LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space.CMY', 'CMY'),
400 array('LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space.YUV', 'YUV'),
401 array('LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space.grey', 'grey'),
402 array('LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space.indx', 'indx'),
403 ),
404 'default' => '',
405 'readOnly' => true,
406 )
407 ),
408 'width' => array(
409 'exclude' => 1,
410 'l10n_mode' => 'exclude',
411 'l10n_display' => 'defaultAsReadonly',
412 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.width',
413 'config' => array(
414 'type' => 'input',
415 'size' => '10',
416 'max' => '20',
417 'eval' => 'int',
418 'default' => '0',
419 'readOnly' => true,
420 ),
421 ),
422 'height' => array(
423 'exclude' => 1,
424 'l10n_mode' => 'exclude',
425 'l10n_display' => 'defaultAsReadonly',
426 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.height',
427 'config' => array(
428 'type' => 'input',
429 'size' => '10',
430 'max' => '20',
431 'eval' => 'int',
432 'default' => '0',
433 'readOnly' => true,
434 ),
435 ),
436 'pages' => array(
437 'exclude' => 1,
438 'l10n_mode' => 'exclude',
439 'l10n_display' => 'defaultAsReadonly',
440 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.pages',
441 'config' => array(
442 'type' => 'input',
443 'size' => 30,
444 'eval' => 'trim',
445 'readOnly' => true
446 ),
447 ),
448 'language' => array(
449 'exclude' => 1,
450 'l10n_mode' => 'exclude',
451 'l10n_display' => 'defaultAsReadonly',
452 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.language',
453 'config' => array(
454 'type' => 'input',
455 'size' => 30,
456 'eval' => 'trim'
457 )
458 ),
459 'fe_groups' => array(
460 'exclude' => 1,
461 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.fe_group',
462 'config' => array(
463 'type' => 'select',
464 'renderType' => 'selectMultipleSideBySide',
465 'size' => 5,
466 'maxitems' => 20,
467 'items' => array(
468 array(
469 'LLL:EXT:lang/locallang_general.xlf:LGL.hide_at_login',
470 -1
471 ),
472 array(
473 'LLL:EXT:lang/locallang_general.xlf:LGL.any_login',
474 -2
475 ),
476 array(
477 'LLL:EXT:lang/locallang_general.xlf:LGL.usergroups',
478 '--div--'
479 )
480 ),
481 'exclusiveKeys' => '-1,-2',
482 'foreign_table' => 'fe_groups',
483 'foreign_table_where' => 'ORDER BY fe_groups.title'
484 )
485 ),
486 ),
487 );
488
489 $GLOBALS['TCA']['sys_file_metadata'] = array_replace_recursive($GLOBALS['TCA']['sys_file_metadata'], $tca);
490
491 // Add category tab if categories column is present
492 if (isset($GLOBALS['TCA']['sys_file_metadata']['columns']['categories'])) {
493 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
494 'sys_file_metadata',
495 '--div--;LLL:EXT:lang/locallang_tca.xlf:sys_category.tabs.category,categories'
496 );
497 }