diff --git a/src/system/modules/metamodelsattribute_file/MetaModelAttributeFile.php b/src/system/modules/metamodelsattribute_file/MetaModelAttributeFile.php index 009ba77..77f7a24 100644 --- a/src/system/modules/metamodelsattribute_file/MetaModelAttributeFile.php +++ b/src/system/modules/metamodelsattribute_file/MetaModelAttributeFile.php @@ -1,4 +1,5 @@ * @copyright The MetaModels team. * @license LGPL. * @filesource */ -if (!defined('TL_ROOT')) -{ - die('You cannot access this file directly!'); -} /** * This is the MetaModelAttribute class for handling file fields. * - * @package MetaModels + * @package MetaModels * @subpackage AttributeFile * @author Christian Schiffler */ @@ -349,6 +346,4 @@ protected function prepareTemplate(MetaModelTemplate $objTemplate, $arrRowData, $this->arrSource = array(); } -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/src/system/modules/metamodelsattribute_file/config/autoload.ini b/src/system/modules/metamodelsattribute_file/config/autoload.ini new file mode 100644 index 0000000..56a51b1 --- /dev/null +++ b/src/system/modules/metamodelsattribute_file/config/autoload.ini @@ -0,0 +1,7 @@ + +;; +; Configure what you want the autoload creator to register +;; +register_namespaces = true +register_classes = true +register_templates = true diff --git a/src/system/modules/metamodelsattribute_file/config/autoload.php b/src/system/modules/metamodelsattribute_file/config/autoload.php new file mode 100644 index 0000000..06241ee --- /dev/null +++ b/src/system/modules/metamodelsattribute_file/config/autoload.php @@ -0,0 +1,34 @@ + + * @author Andreas Isaak + * @copyright The MetaModels team. + * @license LGPL. + * @filesource + */ + +/** + * Register the classes + */ +ClassLoader::addClasses(array +( + 'MetaModelAttributeFile' => 'system/modules/metamodelsattribute_file/MetaModelAttributeFile', +)); + + +/** + * Register the templates + */ +TemplateLoader::addFiles(array +( + 'mm_attr_file' => 'system/modules/metamodelsattribute_file/templates', +)); diff --git a/src/system/modules/metamodelsattribute_file/config/config.php b/src/system/modules/metamodelsattribute_file/config/config.php index 3576501..fa6e6d2 100644 --- a/src/system/modules/metamodelsattribute_file/config/config.php +++ b/src/system/modules/metamodelsattribute_file/config/config.php @@ -1,4 +1,5 @@ * @copyright The MetaModels team. * @license LGPL. * @filesource */ -if (!defined('TL_ROOT')) -{ - die('You cannot access this file directly!'); -} $GLOBALS['METAMODELS']['attributes']['file'] = array ( 'class' => 'MetaModelAttributeFile', 'image' => 'system/modules/metamodelsattribute_file/html/file.png' -); - -?> \ No newline at end of file +); \ No newline at end of file diff --git a/src/system/modules/metamodelsattribute_file/dca/tl_metamodel_attribute.php b/src/system/modules/metamodelsattribute_file/dca/tl_metamodel_attribute.php index c361ea3..05608b6 100644 --- a/src/system/modules/metamodelsattribute_file/dca/tl_metamodel_attribute.php +++ b/src/system/modules/metamodelsattribute_file/dca/tl_metamodel_attribute.php @@ -1,4 +1,5 @@ * @copyright The MetaModels team. * @license LGPL. * @filesource */ -if (!defined('TL_ROOT')) -{ - die('You cannot access this file directly!'); -} /** * Table tl_metamodel_attribute @@ -69,6 +66,4 @@ 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_attribute']['file_filesOnly'], 'inputType' => 'checkbox', 'eval' => array('tl_class'=>'w50 m12') -); - -?> \ No newline at end of file +); \ No newline at end of file diff --git a/src/system/modules/metamodelsattribute_file/dca/tl_metamodel_dcasetting.php b/src/system/modules/metamodelsattribute_file/dca/tl_metamodel_dcasetting.php index 8932244..ccdd8ed 100644 --- a/src/system/modules/metamodelsattribute_file/dca/tl_metamodel_dcasetting.php +++ b/src/system/modules/metamodelsattribute_file/dca/tl_metamodel_dcasetting.php @@ -7,7 +7,7 @@ * data in each collection. * * PHP version 5 - * @package MetaModels + * @package MetaModels * @subpackage AttributeFile * @author Christian Schiffler * @copyright The MetaModels team. @@ -15,15 +15,12 @@ * @filesource */ -$GLOBALS['TL_DCA']['tl_metamodel_dcasetting']['metasubselectpalettes']['attr_id']['file'] = -array +$GLOBALS['TL_DCA']['tl_metamodel_dcasetting']['metasubselectpalettes']['attr_id']['file'] = array ( 'presentation' => array( - 'tl_class', - ), - 'functions' => array( - 'mandatory', - ) -); - -?> \ No newline at end of file + 'tl_class', + ), + 'functions' => array( + 'mandatory', + ) +); \ No newline at end of file diff --git a/src/system/modules/metamodelsattribute_file/dca/tl_metamodel_rendersetting.php b/src/system/modules/metamodelsattribute_file/dca/tl_metamodel_rendersetting.php index bd1ea58..dbbb54f 100644 --- a/src/system/modules/metamodelsattribute_file/dca/tl_metamodel_rendersetting.php +++ b/src/system/modules/metamodelsattribute_file/dca/tl_metamodel_rendersetting.php @@ -1,4 +1,5 @@ * @copyright The MetaModels team. * @license LGPL. * @filesource */ -if (!defined('TL_ROOT')) -{ - die('You cannot access this file directly!'); -} /** * Table tl_metamodel_attribute diff --git a/src/system/modules/metamodelsattribute_file/html/file.png b/src/system/modules/metamodelsattribute_file/html/file.png index 8b8b1ca..4ae4b04 100644 Binary files a/src/system/modules/metamodelsattribute_file/html/file.png and b/src/system/modules/metamodelsattribute_file/html/file.png differ diff --git a/src/system/modules/metamodelsattribute_file/languages/de/tl_metamodel_attribute.php b/src/system/modules/metamodelsattribute_file/languages/de/tl_metamodel_attribute.php index 01902e9..6879216 100644 --- a/src/system/modules/metamodelsattribute_file/languages/de/tl_metamodel_attribute.php +++ b/src/system/modules/metamodelsattribute_file/languages/de/tl_metamodel_attribute.php @@ -1,4 +1,5 @@ * @copyright The MetaModels team. * @license LGPL. * @filesource */ -if (!defined('TL_ROOT')) -{ - die('You cannot access this file directly!'); -} /** * Fields */ -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['typeOptions']['file'] = 'Datei'; +$GLOBALS['TL_LANG']['tl_metamodel_attribute']['typeOptions']['file'] = 'Datei'; $GLOBALS['TL_LANG']['tl_metamodel_attribute']['file_customFiletree'] = array('Dateibaum anpassen', 'Mit dieser Option können Sie individuelle Optionen für die Einbindung von Dateien erstellen.'); $GLOBALS['TL_LANG']['tl_metamodel_attribute']['file_uploadFolder'] = array('Wurzelverzeichnis', 'Wählen Sie das Verzeichnis aus, das Nutzern als Wurzelverzeichnis im Dateibaum dienen soll, wenn sie in der Dateiauswahl eine Auswahl treffen.'); $GLOBALS['TL_LANG']['tl_metamodel_attribute']['file_validFileTypes'] = array('Gültige Dateitypen', 'Bitte geben Sie eine kommagetrennte Liste der Dateitypen ein, die für dieses Feld gültig sind.'); $GLOBALS['TL_LANG']['tl_metamodel_attribute']['file_filesOnly'] = array('Nur Dateien erlauben', 'Wählen Sie diese Option aus, damit die Auswahl auf Dateien beschränkt bleibt. Ordner werden nicht auswählbar sein.'); - -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['file_multiple'] = array('Mehrfachauswahl', 'Wenn Sie die Mehrfachauswahl aktivieren können Benutzer mehrere Dateien (oder Ordner, falls freigegeben) auswählen.'); - - -?> \ No newline at end of file +$GLOBALS['TL_LANG']['tl_metamodel_attribute']['file_multiple'] = array('Mehrfachauswahl', 'Wenn Sie die Mehrfachauswahl aktivieren können Benutzer mehrere Dateien (oder Ordner, falls freigegeben) auswählen.'); \ No newline at end of file diff --git a/src/system/modules/metamodelsattribute_file/languages/de/tl_metamodel_rendersetting.php b/src/system/modules/metamodelsattribute_file/languages/de/tl_metamodel_rendersetting.php index 22e5d36..1da3d4d 100644 --- a/src/system/modules/metamodelsattribute_file/languages/de/tl_metamodel_rendersetting.php +++ b/src/system/modules/metamodelsattribute_file/languages/de/tl_metamodel_rendersetting.php @@ -1,4 +1,5 @@ * @copyright The MetaModels team. * @license LGPL. * @filesource */ -if (!defined('TL_ROOT')) -{ - die('You cannot access this file directly!'); -} /** * Fields @@ -26,12 +23,9 @@ $GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['file_showLink'] = array('Link als Download oder Lightbox erzeugen', 'Mit Aktivierung dieser Option wird das Bild mit einem Link umgeben, um entweder einen Download oder eine Lightbox zu ermöglichen.'); $GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['file_imageSize'] = array('Bildbreite und -höhe', 'Bitte die entweder die Bildbreite, die Bildhöhe oder beides angeben, damit die Bildgröße angepasst wird. Falls dieses feld leer bleibt wird das Bild in Originalgröße angezeigt.'); -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['name_asc'] = 'Dateiname (aufsteigend)'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['name_desc'] = 'Dateiname (absteigend)'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['date_asc'] = 'Datum (absteigend)'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['date_desc'] = 'Datum (aufsteigend)'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['meta'] = 'Meta-Datei (meta.txt)'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['random'] = 'Zufällige Reihenfolge'; - - -?> \ No newline at end of file +$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['name_asc'] = 'Dateiname (aufsteigend)'; +$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['name_desc'] = 'Dateiname (absteigend)'; +$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['date_asc'] = 'Datum (absteigend)'; +$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['date_desc'] = 'Datum (aufsteigend)'; +$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['meta'] = 'Meta-Datei (meta.txt)'; +$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['random'] = 'Zufällige Reihenfolge'; \ No newline at end of file diff --git a/src/system/modules/metamodelsattribute_file/languages/en/tl_metamodel_attribute.php b/src/system/modules/metamodelsattribute_file/languages/en/tl_metamodel_attribute.php index 8c271b8..ea2432e 100644 --- a/src/system/modules/metamodelsattribute_file/languages/en/tl_metamodel_attribute.php +++ b/src/system/modules/metamodelsattribute_file/languages/en/tl_metamodel_attribute.php @@ -1,4 +1,5 @@ * @copyright The MetaModels team. * @license LGPL. * @filesource */ -if (!defined('TL_ROOT')) -{ - die('You cannot access this file directly!'); -} /** * Fields */ -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['typeOptions']['file'] = 'File'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['file_customFiletree'] = array('Customize the file tree', 'Allows you to set custom options for the Filetree.'); -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['file_uploadFolder'] = array('Set file root folder', 'Selects the root point from which the user will select this file field.'); -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['file_validFileTypes'] = array('Valid file types', 'Please enter a comma separated list of extensions of valid file types for this field.'); -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['file_filesOnly'] = array('Allow files only', 'Select this option to restrict the file browser to files only (folders not selectable).'); - -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['file_multiple'] = array('Multiple selection', 'If selected, user will be able to select more than one item.'); - +$GLOBALS['TL_LANG']['tl_metamodel_attribute']['typeOptions']['file'] = 'File'; +$GLOBALS['TL_LANG']['tl_metamodel_attribute']['file_customFiletree'] = array('Customize the file tree', 'Allows you to set custom options for the Filetree.'); +$GLOBALS['TL_LANG']['tl_metamodel_attribute']['file_uploadFolder'] = array('Set file root folder', 'Selects the root point from which the user will select this file field.'); +$GLOBALS['TL_LANG']['tl_metamodel_attribute']['file_validFileTypes'] = array('Valid file types', 'Please enter a comma separated list of extensions of valid file types for this field.'); +$GLOBALS['TL_LANG']['tl_metamodel_attribute']['file_filesOnly'] = array('Allow files only', 'Select this option to restrict the file browser to files only (folders not selectable).'); -?> \ No newline at end of file +$GLOBALS['TL_LANG']['tl_metamodel_attribute']['file_multiple'] = array('Multiple selection', 'If selected, user will be able to select more than one item.'); \ No newline at end of file diff --git a/src/system/modules/metamodelsattribute_file/languages/en/tl_metamodel_rendersetting.php b/src/system/modules/metamodelsattribute_file/languages/en/tl_metamodel_rendersetting.php index 1f76117..66929be 100644 --- a/src/system/modules/metamodelsattribute_file/languages/en/tl_metamodel_rendersetting.php +++ b/src/system/modules/metamodelsattribute_file/languages/en/tl_metamodel_rendersetting.php @@ -1,4 +1,5 @@ * @copyright The MetaModels team. * @license LGPL. * @filesource */ -if (!defined('TL_ROOT')) -{ - die('You cannot access this file directly!'); -} /** * Fields @@ -26,12 +23,9 @@ $GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['file_showLink'] = array('Create link as file download or image lightbox', 'Wraps the item in a link that will show the fullscreen image or download the file.'); $GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['file_imageSize'] = array('Image width and height', 'Please enter either the image width, the image height or both measures to resize the image. If you leave both fields blank, the original image size will be displayed.'); -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['name_asc'] = 'File name (ascending)'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['name_desc'] = 'File name (descending)'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['date_asc'] = 'Date (ascending)'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['date_desc'] = 'Date (descending)'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['meta'] = 'Meta file (meta.txt)'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['random'] = 'Random order'; - - -?> \ No newline at end of file +$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['name_asc'] = 'File name (ascending)'; +$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['name_desc'] = 'File name (descending)'; +$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['date_asc'] = 'Date (ascending)'; +$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['date_desc'] = 'Date (descending)'; +$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['meta'] = 'Meta file (meta.txt)'; +$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['random'] = 'Random order'; \ No newline at end of file