Skip to content

Commit

Permalink
Add contao 3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasisaak committed Mar 5, 2013
1 parent 26b22c3 commit af1a41e
Show file tree
Hide file tree
Showing 12 changed files with 95 additions and 100 deletions.
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
<?php

/**
* The MetaModels extension allows the creation of multiple collections of custom items,
* each with its own unique set of selectable attributes, with attribute extendability.
* The Front-End modules allow you to build powerful listing and filtering of the
* data in each collection.
*
* PHP version 5
* @package MetaModels
* @package MetaModels
* @subpackage AttributeFile
* @author Christian Schiffler <[email protected]>
* @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 <[email protected]>
*/
Expand Down Expand Up @@ -349,6 +346,4 @@ protected function prepareTemplate(MetaModelTemplate $objTemplate, $arrRowData,
$this->arrSource = array();

}
}

?>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

;;
; Configure what you want the autoload creator to register
;;
register_namespaces = true
register_classes = true
register_templates = true
34 changes: 34 additions & 0 deletions src/system/modules/metamodelsattribute_file/config/autoload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

/**
* The MetaModels extension allows the creation of multiple collections of custom items,
* each with its own unique set of selectable attributes, with attribute extendability.
* The Front-End modules allow you to build powerful listing and filtering of the
* data in each collection.
*
* PHP version 5
* @package MetaModels
* @subpackage AttributeFile
* @author Christian Schiffler <[email protected]>
* @author Andreas Isaak <[email protected]>
* @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',
));
11 changes: 3 additions & 8 deletions src/system/modules/metamodelsattribute_file/config/config.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
<?php

/**
* The MetaModels extension allows the creation of multiple collections of custom items,
* each with its own unique set of selectable attributes, with attribute extendability.
* The Front-End modules allow you to build powerful listing and filtering of the
* data in each collection.
*
* PHP version 5
* @package MetaModels
* @package MetaModels
* @subpackage AttributeFile
* @author Christian Schiffler <[email protected]>
* @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'
);

?>
);
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
<?php

/**
* The MetaModels extension allows the creation of multiple collections of custom items,
* each with its own unique set of selectable attributes, with attribute extendability.
* The Front-End modules allow you to build powerful listing and filtering of the
* data in each collection.
*
* PHP version 5
* @package MetaModels
* @subpackage Backend
* @package MetaModels
* @subpackage AttributeFile
* @author Christian Schiffler <[email protected]>
* @copyright The MetaModels team.
* @license LGPL.
* @filesource
*/
if (!defined('TL_ROOT'))
{
die('You cannot access this file directly!');
}

/**
* Table tl_metamodel_attribute
Expand Down Expand Up @@ -69,6 +66,4 @@
'label' => &$GLOBALS['TL_LANG']['tl_metamodel_attribute']['file_filesOnly'],
'inputType' => 'checkbox',
'eval' => array('tl_class'=>'w50 m12')
);

?>
);
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,20 @@
* data in each collection.
*
* PHP version 5
* @package MetaModels
* @package MetaModels
* @subpackage AttributeFile
* @author Christian Schiffler <[email protected]>
* @copyright The MetaModels team.
* @license LGPL.
* @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',
)
);

?>
'tl_class',
),
'functions' => array(
'mandatory',
)
);
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
<?php

/**
* The MetaModels extension allows the creation of multiple collections of custom items,
* each with its own unique set of selectable attributes, with attribute extendability.
* The Front-End modules allow you to build powerful listing and filtering of the
* data in each collection.
*
* PHP version 5
* @package MetaModels
* @subpackage Backend
* @package MetaModels
* @subpackage AttributeFile
* @author Christian Schiffler <[email protected]>
* @copyright The MetaModels team.
* @license LGPL.
* @filesource
*/
if (!defined('TL_ROOT'))
{
die('You cannot access this file directly!');
}

/**
* Table tl_metamodel_attribute
Expand Down
Binary file modified src/system/modules/metamodelsattribute_file/html/file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,33 +1,26 @@
<?php

/**
* The MetaModels extension allows the creation of multiple collections of custom items,
* each with its own unique set of selectable attributes, with attribute extendability.
* The Front-End modules allow you to build powerful listing and filtering of the
* data in each collection.
*
* PHP version 5
* @package MetaModels
* @subpackage Backend
* @package MetaModels
* @subpackage AttributeFile
* @author Christian Schiffler <[email protected]>
* @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.');


?>
$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.');
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
<?php

/**
* The MetaModels extension allows the creation of multiple collections of custom items,
* each with its own unique set of selectable attributes, with attribute extendability.
* The Front-End modules allow you to build powerful listing and filtering of the
* data in each collection.
*
* PHP version 5
* @package MetaModels
* @subpackage Backend
* @package MetaModels
* @subpackage AttributeFile
* @author Christian Schiffler <[email protected]>
* @copyright The MetaModels team.
* @license LGPL.
* @filesource
*/
if (!defined('TL_ROOT'))
{
die('You cannot access this file directly!');
}

/**
* Fields
Expand All @@ -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';


?>
$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';
Original file line number Diff line number Diff line change
@@ -1,33 +1,27 @@
<?php

/**
* The MetaModels extension allows the creation of multiple collections of custom items,
* each with its own unique set of selectable attributes, with attribute extendability.
* The Front-End modules allow you to build powerful listing and filtering of the
* data in each collection.
*
* PHP version 5
* @package MetaModels
* @subpackage Backend
* @package MetaModels
* @subpackage AttributeFile
* @author Christian Schiffler <[email protected]>
* @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).');

?>
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['file_multiple'] = array('Multiple selection', 'If selected, user will be able to select more than one item.');
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
<?php

/**
* The MetaModels extension allows the creation of multiple collections of custom items,
* each with its own unique set of selectable attributes, with attribute extendability.
* The Front-End modules allow you to build powerful listing and filtering of the
* data in each collection.
*
* PHP version 5
* @package MetaModels
* @subpackage Backend
* @package MetaModels
* @subpackage AttributeFile
* @author Christian Schiffler <[email protected]>
* @copyright The MetaModels team.
* @license LGPL.
* @filesource
*/
if (!defined('TL_ROOT'))
{
die('You cannot access this file directly!');
}

/**
* Fields
Expand All @@ -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';


?>
$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';

0 comments on commit af1a41e

Please sign in to comment.