8b2be94b217b528d47f2c04e868431f260dc6ba9
[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 'items' => array(
115 array(
116 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status.1',
117 1,
118 'EXT:filemetadata/Resources/Public/Icons/status_1.png'
119 ),
120 array(
121 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status.2',
122 2,
123 'EXT:filemetadata/Resources/Public/Icons/status_2.png'
124 ),
125 array(
126 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status.3',
127 3,
128 'EXT:filemetadata/Resources/Public/Icons/status_3.png'
129 ),
130 ),
131 ),
132 ),
133 'keywords' => array(
134 'exclude' => 1,
135 'l10n_mode' => 'prefixLangTitle',
136 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.keywords',
137 'config' => array(
138 'placeholder' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:placeholder.keywords',
139 'type' => 'input',
140 'size' => 255,
141 'eval' => 'trim'
142 ),
143 ),
144 'caption' => array(
145 'exclude' => 1,
146 'l10n_mode' => 'prefixLangTitle',
147 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.caption',
148 'config' => array(
149 'type' => 'input',
150 'size' => 30,
151 'eval' => 'trim'
152 ),
153 ),
154 'creator_tool' => array(
155 'exclude' => 1,
156 'l10n_mode' => 'exclude',
157 'l10n_display' => 'defaultAsReadonly',
158 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.creator_tool',
159 'config' => array(
160 'type' => 'input',
161 'size' => 20,
162 'eval' => 'trim'
163 ),
164 ),
165 'download_name' => 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.download_name',
170 'config' => array(
171 'type' => 'input',
172 'size' => 30,
173 'eval' => 'trim'
174 ),
175 ),
176 'creator' => 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.creator',
181 'config' => array(
182 'type' => 'input',
183 'size' => 30,
184 'eval' => 'trim'
185 ),
186 ),
187 'publisher' => 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.publisher',
192 'config' => array(
193 'type' => 'input',
194 'size' => 20,
195 'eval' => 'trim'
196 ),
197 ),
198 'source' => array(
199 'exclude' => 1,
200 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.source',
201 'config' => array(
202 'type' => 'input',
203 'size' => 20,
204 'eval' => 'trim'
205 ),
206 ),
207 'copyright' => array(
208 'exclude' => 1,
209 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.copyright',
210 'config' => array(
211 'type' => 'input',
212 'size' => 20,
213 'eval' => 'trim'
214 ),
215 ),
216 'location_country' => array(
217 'exclude' => 1,
218 'l10n_mode' => 'mergeIfNotBlank',
219 'l10n_display' => '',
220 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.location_country',
221 'config' => array(
222 'type' => 'input',
223 'size' => 20,
224 'eval' => 'trim'
225 ),
226 ),
227 'location_region' => 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_region',
232 'config' => array(
233 'type' => 'input',
234 'size' => 20,
235 'eval' => 'trim'
236 ),
237 ),
238 'location_city' => 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_city',
243 'config' => array(
244 'type' => 'input',
245 'size' => 20,
246 'eval' => 'trim'
247 ),
248 ),
249 'latitude' => array(
250 'exclude' => 1,
251 'l10n_mode' => 'exclude',
252 'l10n_display' => 'defaultAsReadonly',
253 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.latitude',
254 'config' => array(
255 'type' => 'input',
256 'size' => '20',
257 'eval' => 'trim',
258 'max' => '30',
259 'default' => '0.00000000000000'
260 ),
261 ),
262 'longitude' => array(
263 'exclude' => 1,
264 'l10n_mode' => 'exclude',
265 'l10n_display' => 'defaultAsReadonly',
266 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.longitude',
267 'config' => array(
268 'type' => 'input',
269 'size' => '20',
270 'eval' => 'trim',
271 'max' => '30',
272 'default' => '0.00000000000000'
273 ),
274 ),
275 'ranking' => array(
276 'exclude' => 1,
277 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.ranking',
278 'config' => array(
279 'type' => 'select',
280 'minitems' => 1,
281 'maxitems' => 1,
282 'items' => array(
283 array(1, 1),
284 array(2, 2),
285 array(3, 3),
286 array(4, 4),
287 array(5, 5),
288 ),
289 ),
290 ),
291 'content_creation_date' => array(
292 'exclude' => 1,
293 'l10n_mode' => 'exclude',
294 'l10n_display' => 'defaultAsReadonly',
295 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.content_creation_date',
296 'config' => array(
297 'type' => 'input',
298 'size' => 12,
299 'max' => 20,
300 'eval' => 'date',
301 'checkbox' => 1,
302 'default' => time()
303 ),
304 ),
305 'content_modification_date' => array(
306 'exclude' => 1,
307 'l10n_mode' => 'exclude',
308 'l10n_display' => 'defaultAsReadonly',
309 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.content_modification_date',
310 'config' => array(
311 'type' => 'input',
312 'size' => 12,
313 'max' => 20,
314 'eval' => 'date',
315 'checkbox' => 1,
316 'default' => time()
317 ),
318 ),
319 'note' => array(
320 'exclude' => 1,
321 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.note',
322 'config' => array(
323 'type' => 'text',
324 'cols' => 40,
325 'rows' => 15,
326 'eval' => 'trim'
327 ),
328 ),
329 /*
330 * METRICS ###########################################
331 */
332 'unit' => array(
333 'exclude' => 1,
334 'l10n_mode' => 'exclude',
335 'l10n_display' => 'defaultAsReadonly',
336 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit',
337 'config' => array(
338 'type' => 'select',
339 'items' => array(
340 array('', ''),
341 array('px', 'px'),
342 array('mm', 'mm'),
343 array('cm', 'cm'),
344 array('m', 'm'),
345 array('p', 'p'),
346 ),
347 'default' => '',
348 'readOnly' => TRUE,
349 ),
350 ),
351 'duration' => 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.duration',
356 'config' => array(
357 'type' => 'input',
358 'size' => '10',
359 'max' => '20',
360 'eval' => 'int',
361 'default' => '0'
362 )
363 ),
364 'color_space' => array(
365 'exclude' => 1,
366 'l10n_mode' => 'exclude',
367 'l10n_display' => 'defaultAsReadonly',
368 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space',
369 'config' => array(
370 'type' => 'select',
371 'items' => array(
372 array('', ''),
373 array('RGB', 'RGB'),
374 array('CMYK', 'CMYK'),
375 array('CMY', 'CMY'),
376 array('YUV', 'YUV'),
377 array('Grey', 'grey'),
378 array('indexed', 'indx'),
379 ),
380 'default' => '',
381 'readOnly' => TRUE,
382 )
383 ),
384 'width' => array(
385 'exclude' => 1,
386 'l10n_mode' => 'exclude',
387 'l10n_display' => 'defaultAsReadonly',
388 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.width',
389 'config' => array(
390 'type' => 'input',
391 'size' => '10',
392 'max' => '20',
393 'eval' => 'int',
394 'default' => '0',
395 'readOnly' => TRUE,
396 ),
397 ),
398 'height' => array(
399 'exclude' => 1,
400 'l10n_mode' => 'exclude',
401 'l10n_display' => 'defaultAsReadonly',
402 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.height',
403 'config' => array(
404 'type' => 'input',
405 'size' => '10',
406 'max' => '20',
407 'eval' => 'int',
408 'default' => '0',
409 'readOnly' => TRUE,
410 ),
411 ),
412 'pages' => array(
413 'exclude' => 1,
414 'l10n_mode' => 'exclude',
415 'l10n_display' => 'defaultAsReadonly',
416 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.pages',
417 'config' => array(
418 'type' => 'input',
419 'size' => 30,
420 'eval' => 'trim',
421 'readOnly' => TRUE
422 ),
423 ),
424 'language' => array(
425 'exclude' => 1,
426 'l10n_mode' => 'exclude',
427 'l10n_display' => 'defaultAsReadonly',
428 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.language',
429 'config' => array(
430 'type' => 'input',
431 'size' => 30,
432 'eval' => 'trim'
433 )
434 ),
435 'fe_groups' => array(
436 'exclude' => 1,
437 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.fe_group',
438 'config' => array(
439 'type' => 'select',
440 'size' => 5,
441 'maxitems' => 20,
442 'items' => array(
443 array(
444 'LLL:EXT:lang/locallang_general.xlf:LGL.hide_at_login',
445 -1
446 ),
447 array(
448 'LLL:EXT:lang/locallang_general.xlf:LGL.any_login',
449 -2
450 ),
451 array(
452 'LLL:EXT:lang/locallang_general.xlf:LGL.usergroups',
453 '--div--'
454 )
455 ),
456 'exclusiveKeys' => '-1,-2',
457 'foreign_table' => 'fe_groups',
458 'foreign_table_where' => 'ORDER BY fe_groups.title'
459 )
460 ),
461 ),
462 );
463
464 $GLOBALS['TCA']['sys_file_metadata'] = array_replace_recursive($GLOBALS['TCA']['sys_file_metadata'], $tca);
465
466 // Add category tab if categories column is present
467 if (isset($GLOBALS['TCA']['sys_file_metadata']['columns']['categories'])) {
468 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
469 'sys_file_metadata',
470 '--div--;LLL:EXT:lang/locallang_tca.xlf:sys_category.tabs.category,categories'
471 );
472 }