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