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