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