public function setup(SimpleXMLElement $element, $value, $group = null) { $this->element = $element; $element['label'] = $this->prepareText($element['label']); $element['description'] = $this->prepareText($element['description']); $element['translateDescription'] = false; return parent::setup($element, $value, $group); }
public function setup(SimpleXMLElement $element, $value, $group = null) { $result = parent::setup($element, $value, $group); $list = array(); $list[] = new LightboxInfo(JFormFieldLightboxList::LYTEBOX, 'Lytebox 3', '3.25', '-', 'http://lytebox.com/', 'Markus F. Hay', array('Creative Commons Attribution 3.0 License' => 'http://creativecommons.org/licenses/by/3.0/')); $list[] = new LightboxInfo(JFormFieldLightboxList::LYTEBOX5, 'Lytebox 5', '5.5', '-', 'http://lytebox.com/', 'Markus F. Hay', array('Creative Commons Attribution 3.0 License' => 'http://creativecommons.org/licenses/by/3.0/')); $list[] = new LightboxInfo(JFormFieldLightboxList::LIGHTBOX2, 'Lightbox 2', '2.6', 'jQuery (Joomla)', 'http://lokeshdhakar.com/projects/lightbox2/', 'Lokesh Dhakar', array('Creative Commons Attribution 2.5 License' => 'http://creativecommons.org/licenses/by/2.5/')); $list[] = new LightboxInfo(JFormFieldLightboxList::FANCYBOX, 'Fancybox', '1.3.4', 'jQuery (Joomla)', 'http://fancybox.net/blog', 'Janis Skarnelis', array('MIT License, ' => 'http://www.opensource.org/licenses/mit-license.php', 'GPL3' => 'http://www.gnu.org/licenses/gpl.html')); $list[] = new LightboxInfo(JFormFieldLightboxList::SLIMBOX_20, 'Slimbox 2', '2.05', 'jQuery (Joomla)', 'http://www.digitalia.be/software/slimbox2', 'Christophe Beyls', array('MIT License' => 'http://www.opensource.org/licenses/mit-license.php')); $list[] = new LightboxInfo(JFormFieldLightboxList::PRIOBOX, 'PiroBox Extended', '1.0', 'jQuery (Joomla)', 'http://www.pirolab.it/pirobox/', 'Diego Valobra', array('CC-BY-SA' => 'http://creativecommons.org/licenses/by-sa/3/')); $licenseInfo = '<table width="100%" border="1">'; $licenseInfo = $licenseInfo . LightboxInfo::writeTableHeader(); foreach ($list as $l) { $licenseInfo = $licenseInfo . $l->writeAsTableRow(); } $licenseInfo = $licenseInfo . '</table>'; $element['description'] = $licenseInfo; return $result; }