[FEATURE] Advanced metadata for File 15/24715/7
authorFabien Udriot <fabien.udriot@ecodev.ch>
Sun, 13 Oct 2013 22:33:35 +0000 (00:33 +0200)
committerSteffen Ritter <info@rs-websystems.de>
Tue, 15 Oct 2013 13:55:49 +0000 (15:55 +0200)
The Core provides advanced metadata for File within a Core
extension "filemetadata". The extension is not activated
by default but can be when advanced metadata are needed.

The main benefit is to have unified metadata in TYPO3.
As a result, third-party extensions can build upon a common
base preventing segmentation.

Change-Id: I2e7ce7ac0d072f296b11dfa2189d32e5539f9994
Releases: 6.2
Resolves: #52719
Documentation: #52769
Reviewed-on: https://review.typo3.org/24715
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/filemetadata/Configuration/TCA/fe_groups.php [new file with mode: 0644]
typo3/sysext/filemetadata/Configuration/TCA/sys_file_metadata.php [new file with mode: 0644]
typo3/sysext/filemetadata/Resources/Private/Language/locallang_tca.xlf [new file with mode: 0644]
typo3/sysext/filemetadata/Resources/Public/Icons/status_1.png [new file with mode: 0755]
typo3/sysext/filemetadata/Resources/Public/Icons/status_2.png [new file with mode: 0755]
typo3/sysext/filemetadata/Resources/Public/Icons/status_3.png [new file with mode: 0755]
typo3/sysext/filemetadata/composer.json [new file with mode: 0644]
typo3/sysext/filemetadata/ext_emconf.php [new file with mode: 0644]
typo3/sysext/filemetadata/ext_icon.gif [new file with mode: 0644]
typo3/sysext/filemetadata/ext_tables.sql [new file with mode: 0644]

diff --git a/typo3/sysext/filemetadata/Configuration/TCA/fe_groups.php b/typo3/sysext/filemetadata/Configuration/TCA/fe_groups.php
new file mode 100644 (file)
index 0000000..e14beb9
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+if (!defined('TYPO3_MODE')) die ('Access denied.');
+
+$tca = array(
+       // Opposite relation for sys_file_metadata.fe_groups.
+       // The field is configured but not displayed by default for a FE Group.
+       // To display it update your TCA as example:
+       // $tca['types'][0]['showitem'] = $GLOBALS['TCA']['fe_groups']['types'][0]['showitem'] . ',files'
+       'columns' => array(
+               'files' => array(
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:fe_groups.files',
+                       'config' => array(
+                               'type' => 'select',
+                               'size' => 10,
+                               'minitems' => 0,
+                               'maxitems' => 9999,
+                               'autoSizeMax' => 30,
+                               'multiple' => 0,
+                               'foreign_table' => 'sys_file_metadata',
+                               'MM' => 'sys_file_fegroups_mm',
+                               'MM_opposite_field' => 'fe_groups',
+                       ),
+               ),
+       ),
+);
+
+return \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge_recursive_overrule($GLOBALS['TCA']['fe_groups'], $tca);
+?>
\ No newline at end of file
diff --git a/typo3/sysext/filemetadata/Configuration/TCA/sys_file_metadata.php b/typo3/sysext/filemetadata/Configuration/TCA/sys_file_metadata.php
new file mode 100644 (file)
index 0000000..aa9e788
--- /dev/null
@@ -0,0 +1,442 @@
+<?php
+if (!defined('TYPO3_MODE')) die ('Access denied.');
+
+$tca = array(
+       'ctrl' => array(
+               'type' => 'type',
+               'typeicon_column' => 'type',
+               'typeicon_classes' => array(
+                       '1' => 'mimetypes-text-text',
+                       '2' => 'mimetypes-media-image',
+                       '3' => 'mimetypes-media-audio',
+                       '4' => 'mimetypes-media-video',
+                       '5' => 'mimetypes-application',
+                       'default' => 'mimetypes-other-other'
+               ),
+       ),
+       'types' => array(
+               TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => array('showitem' => '
+                                                               fileinfo, title, description, alternative, keywords, caption, download_name,
+
+                                                               --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,
+                                                                       --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10;; ,
+                                                                       fe_groups,
+
+                                                               --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
+                                                                       creator, --palette--;;20;;,
+                                                                       --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40;;'),
+
+               TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array('showitem' => '
+                                                               fileinfo, title, description, alternative, keywords, caption, download_name,
+
+                                                               --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,
+                                                                       --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10;; ,
+                                                                       fe_groups,
+
+                                                               --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
+                                                                       creator, --palette--;;20;;,
+                                                                       --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40;;,
+                                                                       language'),
+
+               TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array('showitem' => '
+                                                               fileinfo, title, description, alternative, keywords, caption, download_name,
+
+                                                               --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,
+                                                                       --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10;; ,
+                                                                       fe_groups,
+
+                                                               --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
+                                                                       creator, --palette--;;20;;,
+                                                                       --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40;; ,
+                                                                       --palette--;;30;;,
+                                                                       --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.metrics;50;;'),
+
+               TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array('showitem' => '
+
+                                                               fileinfo, title, description, alternative, keywords, caption, download_name,
+
+                                                               --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,
+                                                                       --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10;; ,
+                                                                       fe_groups,
+
+                                                               --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
+                                                                       duration,
+                                                                       creator, --palette--;;20;;, language'),
+
+               TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array('showitem' => '
+                                                               fileinfo, title, description, alternative, keywords, caption, download_name,
+
+                                                               --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,
+                                                                       --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10;; ,
+                                                                       fe_groups,
+
+                                                               --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
+                                                                       duration,
+                                                                       creator, --palette--;;20;;, language'),
+
+               TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array('showitem' => '
+                                                               fileinfo, title, description, alternative, keywords, caption, download_name,
+
+                                                               --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,
+                                                                       --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10;; ,
+                                                                       fe_groups,
+
+                                                               --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
+                                                                       creator, --palette--;;20;;,
+                                                                       --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40;; ,
+                                                                       language, --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.content_date;60;;, pages'),
+       ),
+       'palettes' => array(
+               '10' => array('showitem' => 'visible, status, ranking', 'canNotCollapse' => '1'),
+               '20' => array('showitem' => 'publisher, source', 'canNotCollapse' => '1'),
+               '30' => array('showitem' => 'latitude, longitude', 'canNotCollapse' => '1'),
+               '40' => array('showitem' => 'location_country, location_region, location_city', 'canNotCollapse' => '1'),
+               '50' => array('showitem' => 'width, height, unit, color_space', 'canNotCollapse' => '1'),
+               '60' => array('showitem' => 'content_creation_date, content_modification_date', 'canNotCollapse' => '1'),
+       ),
+       'columns' => array(
+               'visible' => array(
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.visible',
+                       'config' => array(
+                               'type' => 'check',
+                               'default' => '1'
+                       ),
+               ),
+               'status' => array(
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status',
+                       'config' => array(
+                               'type' => 'select',
+                               'items' => array(
+                                       array(
+                                               'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status.1',
+                                               1,
+                                               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('filemetadata') . 'Resources/Public/Icons/status_1.png'
+                                       ),
+                                       array(
+                                               'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status.2',
+                                               2,
+                                               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('filemetadata') . 'Resources/Public/Icons/status_2.png'
+                                       ),
+                                       array(
+                                               'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status.3',
+                                               3,
+                                               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('filemetadata') . 'Resources/Public/Icons/status_3.png'
+                                       ),
+                               ),
+                       ),
+               ),
+               'keywords' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'prefixLangTitle',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.keywords',
+                       'config' => array(
+                               'placeholder' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:placeholder.keywords',
+                               'type' => 'input',
+                               'size' => 255,
+                               'eval' => 'trim'
+                       ),
+               ),
+               'caption' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'prefixLangTitle',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.caption',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 30,
+                               'eval' => 'trim'
+                       ),
+               ),
+               'creator_tool' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'exclude',
+                       'l10n_display' => 'defaultAsReadonly',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.creator_tool',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 20,
+                               'eval' => 'trim'
+                       ),
+               ),
+               'download_name' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'exclude',
+                       'l10n_display' => 'defaultAsReadonly',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.download_name',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 30,
+                               'eval' => 'trim'
+                       ),
+               ),
+               'creator' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'exclude',
+                       'l10n_display' => 'defaultAsReadonly',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.creator',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 30,
+                               'eval' => 'trim'
+                       ),
+               ),
+               'publisher' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'exclude',
+                       'l10n_display' => 'defaultAsReadonly',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.publisher',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 20,
+                               'eval' => 'trim'
+                       ),
+               ),
+               'source' => array(
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.source',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 20,
+                               'eval' => 'trim'
+                       ),
+               ),
+               'location_country' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'mergeIfNotBlank',
+                       'l10n_display' => '',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.location_country',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 20,
+                               'eval' => 'trim'
+                       ),
+               ),
+               'location_region' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'mergeIfNotBlank',
+                       'l10n_display' => '',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.location_region',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 20,
+                               'eval' => 'trim'
+                       ),
+               ),
+               'location_city' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'mergeIfNotBlank',
+                       'l10n_display' => '',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.location_city',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 20,
+                               'eval' => 'trim'
+                       ),
+               ),
+               'latitude' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'exclude',
+                       'l10n_display' => 'defaultAsReadonly',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.latitude',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => '20',
+                               'eval' => 'trim',
+                               'max' => '30',
+                               'default' => '0.00000000000000'
+                       ),
+               ),
+               'longitude' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'exclude',
+                       'l10n_display' => 'defaultAsReadonly',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.longitude',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => '20',
+                               'eval' => 'trim',
+                               'max' => '30',
+                               'default' => '0.00000000000000'
+                       ),
+               ),
+               'ranking' => array(
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.ranking',
+                       'config' => array(
+                               'type' => 'select',
+                               'minitems' => 1,
+                               'maxitems' => 1,
+                               'items' => array(
+                                       array(1, 1),
+                                       array(2, 2),
+                                       array(3, 3),
+                                       array(4, 4),
+                                       array(5, 5),
+                               ),
+                       ),
+               ),
+               'content_creation_date' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'exclude',
+                       'l10n_display' => 'defaultAsReadonly',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.content_creation_date',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 12,
+                               'max' => 20,
+                               'eval' => 'date',
+                               'checkbox' => 1,
+                               'default' => time()
+                       ),
+               ),
+               'content_modification_date' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'exclude',
+                       'l10n_display' => 'defaultAsReadonly',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.content_modification_date',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 12,
+                               'max' => 20,
+                               'eval' => 'date',
+                               'checkbox' => 1,
+                               'default' => time()
+                       ),
+               ),
+               'note' => array(
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.note',
+                       'config' => array(
+                               'type' => 'text',
+                               'cols' => 40,
+                               'rows' => 15,
+                               'eval' => 'trim'
+                       ),
+               ),
+               /*
+                * METRICS ###########################################
+                */
+               'unit' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'exclude',
+                       'l10n_display' => 'defaultAsReadonly',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit',
+                       'config' => array(
+                               'type' => 'select',
+                               'items' => array(
+                                       array('', ''),
+                                       array('px', 'px'),
+                                       array('mm', 'mm'),
+                                       array('cm', 'cm'),
+                                       array('m', 'm'),
+                                       array('p', 'p'),
+                               ),
+                               'default' => '',
+                               'readOnly' => TRUE,
+                       ),
+               ),
+               'duration' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'exclude',
+                       'l10n_display' => 'defaultAsReadonly',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.duration',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => '10',
+                               'max' => '20',
+                               'eval' => 'int',
+                               'default' => '0'
+                       )
+               ),
+               'color_space' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'exclude',
+                       'l10n_display' => 'defaultAsReadonly',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space',
+                       'config' => array(
+                               'type' => 'select',
+                               'items' => array(
+                                       array('', ''),
+                                       array('RGB', 'RGB'),
+                                       array('CMYK', 'CMYK'),
+                                       array('CMY', 'CMY'),
+                                       array('YUV', 'YUV'),
+                                       array('Grey', 'grey'),
+                                       array('indexed', 'indx'),
+                               ),
+                               'default' => '',
+                               'readOnly' => TRUE,
+                       )
+               ),
+               'width' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'exclude',
+                       'l10n_display' => 'defaultAsReadonly',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.width',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => '10',
+                               'max' => '20',
+                               'eval' => 'int',
+                               'default' => '0',
+                               'readOnly' => TRUE,
+                       ),
+               ),
+               'height' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'exclude',
+                       'l10n_display' => 'defaultAsReadonly',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.height',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => '10',
+                               'max' => '20',
+                               'eval' => 'int',
+                               'default' => '0',
+                               'readOnly' => TRUE,
+                       ),
+               ),
+               'pages' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'exclude',
+                       'l10n_display' => 'defaultAsReadonly',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.pages',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 30,
+                               'eval' => 'trim',
+                               'readOnly' => TRUE
+                       ),
+               ),
+               'language' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'exclude',
+                       'l10n_display' => 'defaultAsReadonly',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.language',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 30,
+                               'eval' => 'trim'
+                       )
+               ),
+               'fe_groups' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'exclude',
+                       'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.fe_groups',
+                       'config' => array(
+                               'type' => 'select',
+                               'size' => 10,
+                               'minitems' => 0,
+                               'maxitems' => 9999,
+                               'autoSizeMax' => 30,
+                               'multiple' => 0,
+                               'foreign_table' => 'fe_groups',
+                               'MM' => 'sys_file_fegroups_mm',
+                       ),
+               ),
+       ),
+);
+
+
+return \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge_recursive_overrule($GLOBALS['TCA']['sys_file_metadata'], $tca);
\ No newline at end of file
diff --git a/typo3/sysext/filemetadata/Resources/Private/Language/locallang_tca.xlf b/typo3/sysext/filemetadata/Resources/Private/Language/locallang_tca.xlf
new file mode 100644 (file)
index 0000000..6ee3d4f
--- /dev/null
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<xliff version="1.0">
+       <file source-language="en" datatype="plaintext" original="messages" date="2012-10-17T17:55:17Z"
+             product-name="local lang">
+               <header/>
+               <body>
+
+                       <!-- sys_file_metadata fields -->
+                       <trans-unit id="sys_file_metadata.visible">
+                               <source>Visible</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.status">
+                               <source>Status</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.status.1">
+                               <source>Ok</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.status.2">
+                               <source>Pending</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.status.3">
+                               <source>Under review</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.keywords">
+                               <source>Keywords</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.caption">
+                               <source>Caption</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.creator_tool">
+                               <source>Creator Tool</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.download_name">
+                               <source>Download Name</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.creator">
+                               <source>Creator</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.publisher">
+                               <source>Publisher</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.source">
+                               <source>Source</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.location_country">
+                               <source>Country</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.location_region">
+                               <source>Region</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.location_city">
+                               <source>City</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.latitude">
+                               <source>Latitude</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.longitude">
+                               <source>Longitude</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.ranking">
+                               <source>Ranking</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.content_creation_date">
+                               <source>Content Creation Date</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.content_modification_date">
+                               <source>Content Modification Date</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.note">
+                               <source>Note</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.unit">
+                               <source>Unit</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.duration">
+                               <source>Duration</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.color_space">
+                               <source>Color Space</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.pages">
+                               <source>Number of Pages</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.language">
+                               <source>File Language</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.fe_groups">
+                               <source>Frontend Permission</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.width">
+                               <source>Width</source>
+                       </trans-unit>
+                       <trans-unit id="sys_file_metadata.height">
+                               <source>Height</source>
+                       </trans-unit>
+
+                       <!-- sys_file_metadata tabs -->
+                       <trans-unit id="tabs.metadata">
+                               <source>Metadata</source>
+                       </trans-unit>
+
+                       <!-- sys_file_metadata placeholder -->
+                       <trans-unit id="placeholder.keywords">
+                               <source>Keywords1, keywords2, ...</source>
+                       </trans-unit>
+
+                       <!-- sys_file_metadata palette -->
+                       <trans-unit id="palette.metrics">
+                               <source>Metrics</source>
+                       </trans-unit>
+                       <trans-unit id="palette.geo_location">
+                               <source>Geo Location</source>
+                       </trans-unit>
+                       <trans-unit id="palette.visibility">
+                               <source>Visibility</source>
+                       </trans-unit>
+                       <trans-unit id="palette.content_date">
+                               <source>Content Date</source>
+                       </trans-unit>
+
+                       <!-- fe_groups fields -->
+                       <trans-unit id="fe_groups.files">
+                               <source>Allowed files</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
\ No newline at end of file
diff --git a/typo3/sysext/filemetadata/Resources/Public/Icons/status_1.png b/typo3/sysext/filemetadata/Resources/Public/Icons/status_1.png
new file mode 100755 (executable)
index 0000000..a9925a0
Binary files /dev/null and b/typo3/sysext/filemetadata/Resources/Public/Icons/status_1.png differ
diff --git a/typo3/sysext/filemetadata/Resources/Public/Icons/status_2.png b/typo3/sysext/filemetadata/Resources/Public/Icons/status_2.png
new file mode 100755 (executable)
index 0000000..57b03ce
Binary files /dev/null and b/typo3/sysext/filemetadata/Resources/Public/Icons/status_2.png differ
diff --git a/typo3/sysext/filemetadata/Resources/Public/Icons/status_3.png b/typo3/sysext/filemetadata/Resources/Public/Icons/status_3.png
new file mode 100755 (executable)
index 0000000..564a1a9
Binary files /dev/null and b/typo3/sysext/filemetadata/Resources/Public/Icons/status_3.png differ
diff --git a/typo3/sysext/filemetadata/composer.json b/typo3/sysext/filemetadata/composer.json
new file mode 100644 (file)
index 0000000..0cbee8a
--- /dev/null
@@ -0,0 +1,15 @@
+{
+       "name": "typo3/cms/filemetadata",
+       "type": "typo3cms-framework",
+       "description": "TYPO3 Core",
+       "homepage": "http://typo3.org",
+       "license": ["GPL-2.0+"],
+       "version": "6.2.0",
+
+       "require": {
+               "typo3/cms/core": "*"
+       },
+       "replace": {
+               "filemetadata": "*"
+       }
+}
diff --git a/typo3/sysext/filemetadata/ext_emconf.php b/typo3/sysext/filemetadata/ext_emconf.php
new file mode 100644 (file)
index 0000000..d0ab0c5
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+
+/*********************************************************************
+ * Extension configuration file for ext "filemetadata".
+ *********************************************************************/
+
+$EM_CONF[$_EXTKEY] = array(
+       'title' => 'Advanced file metadata',
+       'description' => 'Add advanced metadata to File.',
+       'category' => 'misc',
+       'shy' => '',
+       'priority' => '',
+       'module' => '',
+       'state' => 'stable',
+       'internal' => '',
+       'uploadfolder' => '0',
+       'createDirs' => '',
+       'modify_tables' => '',
+       'clearCacheOnLoad' => 0,
+       'lockType' => '',
+       'version' => '6.2.0',
+       'constraints' =>
+       array(
+               'depends' => array(
+                       'typo3' => '6.2.0-6.2.99',
+               ),
+               'conflicts' => array(),
+               'suggests' => array(),
+       ),
+);
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/filemetadata/ext_icon.gif b/typo3/sysext/filemetadata/ext_icon.gif
new file mode 100644 (file)
index 0000000..68353e3
Binary files /dev/null and b/typo3/sysext/filemetadata/ext_icon.gif differ
diff --git a/typo3/sysext/filemetadata/ext_tables.sql b/typo3/sysext/filemetadata/ext_tables.sql
new file mode 100644 (file)
index 0000000..aadf4c7
--- /dev/null
@@ -0,0 +1,58 @@
+#
+# Table structure for table 'sys_file_metadata'
+#
+CREATE TABLE sys_file_metadata (
+
+       type varchar(10) DEFAULT '' NOT NULL,
+       visible int(11) unsigned DEfAULT '0' NOT NULL,
+       status varchar(24) DEFAULT '' NOT NULL,
+       keywords text NOT NULL,
+       caption varchar(255) DEFAULT '' NOT NULL,
+       creator_tool varchar(255) DEFAULT '' NOT NULL,
+       download_name varchar(255) DEFAULT '' NOT NULL,
+       creator varchar(255) DEFAULT '' NOT NULL,
+       publisher varchar(45) DEFAULT '' NOT NULL,
+       source varchar(255) DEFAULT '' NOT NULL,
+       location_country varchar(45) DEFAULT '' NOT NULL,
+       location_region varchar(45) DEFAULT '' NOT NULL,
+       location_city varchar(45) DEFAULT '' NOT NULL,
+       latitude decimal(24,14) DEFAULT '0.00000000000000' NOT NULL,
+       longitude decimal(24,14) DEFAULT '0.00000000000000' NOT NULL,
+       ranking int(11) unsigned DEFAULT '0',
+       content_creation_date int(11) unsigned DEFAULT '0',
+       content_modification_date int(11) unsigned DEFAULT '0',
+       note text NOT NULL,
+
+       # px,mm,cm,m,p, ...
+       unit char(3) DEFAULT '' NOT NULL,
+
+       # AUDIO + VIDEO
+       duration float unsigned DEFAULT '0' NOT NULL,
+
+       # RGB,sRGB,YUV, ...
+       color_space varchar(4) DEFAULT '' NOT NULL,
+
+       # TEXT ASSET
+       # text document include x pages
+       pages int(4) unsigned DEFAULT '0' NOT NULL,
+
+       # TEXT + AUDIO + VIDEO
+       # correspond to the language of the document
+       language varchar(12) DEFAULT '' NOT NULL,
+
+       # FE permissions
+       fe_groups int(11) unsigned DEfAULT '0' NOT NULL,
+);
+
+#
+# Table structure for table 'sys_file_fegroups_mm'
+#
+CREATE TABLE sys_file_fegroups_mm (
+       uid_local int(11) unsigned DEFAULT '0' NOT NULL,
+       uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
+       sorting int(11) unsigned DEFAULT '0' NOT NULL,
+       sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,
+
+       KEY uid_local (uid_local),
+       KEY uid_foreign (uid_foreign)
+);