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