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