Файловый менеджер - Редактировать - /home/harasnat/www/mf/mod_sigplus.zip
Назад
PK j�/[U ^�� � helper.phpnu �[��� <?php /** * @file * @brief sigplus Image Gallery Plus module for Joomla * @author Levente Hunyadi * @version 1.5.0 * @remarks Copyright (C) 2009-2023 Levente Hunyadi * @remarks Licensed under GNU/GPLv3, see https://www.gnu.org/licenses/gpl-3.0.html * @see https://hunyadi.info.hu/projects/sigplus */ /* * sigplus Image Gallery Plus module for Joomla * Copyright 2009-2023 Levente Hunyadi * * sigplus is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * sigplus is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ // no direct access defined('_JEXEC') or die('Restricted access'); jimport('joomla.plugin.plugin'); jimport('joomla.html.parameter'); use Joomla\CMS\Language\Text; use Joomla\CMS\Plugin\PluginHelper; /** * Triggered when a mandatory dependency is missing or there is a version mismatch. */ class SigPlusNovoModuleDependencyException extends Exception { protected $version_module; protected $version_plugin; /** * Creates a new exception instance. * @param {string} $key Error message language key. */ public function __construct($key, $version = null) { $this->version_module = SIGPLUS_VERSION_MODULE; $this->version_plugin = isset($version) ? $version : 'SIGPLUS_UNKNOWN'; $message = '['.$key.'] '.Text::_($key); // get localized message text $search = array(); $replace = array(); foreach (get_object_vars($this) as $property => $value) { $search[] = '{$'.$property.'}'; // replace placeholders in message text $text = (string) $this->$property; if (preg_match('/^[A-Z][0-9A-Z_]*$/', $text)) { // could be a language key $text = Text::_($text); } $replace[] = htmlspecialchars($text); } $message = str_replace($search, $replace, $message); parent::__construct($message); } } class SigPlusNovoModuleHelper { private static $core; /** * Imports module dependencies. */ public static function import() { if (isset(self::$core)) { return self::$core; } self::$core = false; // load sigplus content plug-in if (!PluginHelper::importPlugin('content', SIGPLUS_PLUGIN_FOLDER)) { throw new SigPlusNovoModuleDependencyException('SIGPLUS_EXCEPTION_DEPENDENCY_MISSING'); } if (!defined('SIGPLUS_VERSION')) { throw new SigPlusNovoModuleDependencyException('SIGPLUS_EXCEPTION_DEPENDENCY_MISMATCH'); } if (SIGPLUS_VERSION_MODULE !== '$__'.'VERSION'.'__$' && SIGPLUS_VERSION_MODULE !== SIGPLUS_VERSION) { throw new SigPlusNovoModuleDependencyException('SIGPLUS_EXCEPTION_DEPENDENCY_MISMATCH', SIGPLUS_VERSION); } // load sigplus content plug-in parameters $plugin = PluginHelper::getPlugin('content', SIGPLUS_PLUGIN_FOLDER); $params = json_decode($plugin->params); // create configuration parameter objects $configuration = new SigPlusNovoConfigurationParameters(); $configuration->service = new SigPlusNovoServiceParameters(); $configuration->service->setParameters($params); $configuration->gallery = new SigPlusNovoGalleryParameters(); $configuration->gallery->setParameters($params); if (SIGPLUS_LOGGING || $configuration->service->debug_server) { SigPlusNovoLogging::setService(new SigPlusNovoHTMLLogging()); } else { SigPlusNovoLogging::setService(new SigPlusNovoNoLogging()); } self::$core = new SigPlusNovoCore($configuration); return self::$core; } } PK j�/[wtW� index.htmlnu �[��� <html><body></body></html>PK j�/[�hP\� � script.phpnu �[��� <?php /** * @file * @brief sigplus Image Gallery Plus installer script * @author Levente Hunyadi * @version 1.5.0 * @remarks Copyright (C) 2009-2023 Levente Hunyadi * @remarks Licensed under GNU/GPLv3, see https://www.gnu.org/licenses/gpl-3.0.html * @see https://hunyadi.info.hu/projects/sigplus */ /* * sigplus Image Gallery Plus module for Joomla * Copyright 2009-2023 Levente Hunyadi * * sigplus is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * sigplus is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); if (!defined('SIGPLUS_PLUGIN_FOLDER')) { define('SIGPLUS_PLUGIN_FOLDER', 'sigplus'); } if (!defined('SIGPLUS_MEDIA_FOLDER')) { define('SIGPLUS_MEDIA_FOLDER', 'sigplus'); } // protect duplicate class defintion when file has already been included from the installation (temporary) directory (e.g. by the plug-in installer) if (!class_exists('SigPlusNovoDatabaseSetup')) { require_once JPATH_ROOT.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.'content'.DIRECTORY_SEPARATOR.SIGPLUS_PLUGIN_FOLDER.DIRECTORY_SEPARATOR.'core'.DIRECTORY_SEPARATOR.'setup.php'; } use Joomla\CMS\Factory; class mod_SigPlusNovoInstallerScript { function __construct($parent) { } function install($parent) { } function uninstall($parent) { } function update($parent) { } function preflight($type, $parent) { } function postflight($type, $parent) { // copy language file self::copyLanguageFiles(); // copy back-end controls $sourcepath = JPATH_ROOT.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.'content'.DIRECTORY_SEPARATOR.SIGPLUS_PLUGIN_FOLDER.DIRECTORY_SEPARATOR.'fields'; $targetpath = JPATH_ROOT.DIRECTORY_SEPARATOR.'modules'.DIRECTORY_SEPARATOR.'mod_'.SIGPLUS_PLUGIN_FOLDER.DIRECTORY_SEPARATOR.'fields'; $fieldfiles = scandir($sourcepath); foreach ($fieldfiles as $fieldfile) { if (pathinfo($sourcepath.DIRECTORY_SEPARATOR.$fieldfile, PATHINFO_EXTENSION) == 'php') { @copy($sourcepath.DIRECTORY_SEPARATOR.$fieldfile, $targetpath.DIRECTORY_SEPARATOR.$fieldfile); } } switch ($type) { case 'update': self::migrateConfiguration(); break; } } /** * Appends plug-in language strings to the module language file. */ private static function copyLanguageFiles() { $admin_language_root = JPATH_ROOT.DIRECTORY_SEPARATOR.'administrator'.DIRECTORY_SEPARATOR.'language'; $site_language_root = JPATH_ROOT.DIRECTORY_SEPARATOR.'language'; foreach (scandir($admin_language_root) as $language_code) { // iterate over installed plug-in languages if (!preg_match('/^[a-z]{2}-[A-Z]{2}$/', $language_code) || !is_dir($admin_language_root.DIRECTORY_SEPARATOR.$language_code)) { continue; } $admin_language_folder = $admin_language_root.DIRECTORY_SEPARATOR.$language_code; $plugin_language_file = $admin_language_folder.DIRECTORY_SEPARATOR.$language_code.'.plg_content_'.SIGPLUS_PLUGIN_FOLDER.'.ini'; $site_language_folder = $site_language_root.DIRECTORY_SEPARATOR.$language_code; $module_language_file = $site_language_folder.DIRECTORY_SEPARATOR.$language_code.'.mod_'.SIGPLUS_PLUGIN_FOLDER.'.ini'; if (!is_file($plugin_language_file) || !is_file($module_language_file)) { continue; } // parse language file $plugin_language = parse_ini_file($plugin_language_file); $module_language = parse_ini_file($module_language_file); if ($plugin_language === false || $module_language === false) { continue; } // concatenate language data, filtering duplicates $lang_strings = array_merge($module_language, $plugin_language); // write language file $lang_data = array( '; en-GB.mod_sigplus.ini'.PHP_EOL, '; Copyright (C) 2009-2022 Levente Hunyadi'.PHP_EOL, '; License https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL, see LICENSE.php'.PHP_EOL, '; Note : All ini files need to be saved as UTF-8 - No BOM'.PHP_EOL, PHP_EOL ); foreach ($lang_strings as $lang_key => $lang_value) { $lang_data[] = $lang_key.'="'.addcslashes($lang_value, '\\"').'"'.PHP_EOL; } file_put_contents($module_language_file, $lang_data); } } private static function migrateConfiguration() { if (version_compare(JVERSION, '4.0') >= 0) { $db = Factory::getContainer()->get(Joomla\Database\DatabaseInterface::class); } else { $db = Factory::getDBO(); } // iterate over existing module configuration settings $db->setQuery('SELECT id FROM #__modules WHERE module = '.$db->quote('mod_sigplus')); $modules = $db->loadColumn(); foreach ($modules as $id) { // read existing module configuration settings $db->setQuery('SELECT params FROM #__modules WHERE module = '.$db->quote('mod_sigplus').' AND id = ' . $id); $oldparams = json_decode($db->loadResult(), true); // make sure we are migrating a 1.4.x installation to a 1.5.x installation if (!empty($oldparams) && !isset($oldparams['source'])) { $newparams = SigPlusNovoDatabaseSetup::migrateExtensionConfiguration($oldparams); // store the combined new and existing module settings back as a JSON string $paramstring = json_encode($newparams); $db->setQuery('UPDATE #__modules SET params = ' . $db->quote($paramstring) . ' WHERE id = ' . $id); $db->execute(); } } } } class mod_SIGPlusInstallerScript extends mod_SigPlusNovoInstallerScript { } PK j�/[�c�(� � fields/compat.phpnu �[��� <?php /** * @file * @brief sigplus Image Gallery Plus definitions for Joomla 3/4/5 compatibility * @author Levente Hunyadi * @version 1.5.0 * @remarks Copyright (C) 2009-2023 Levente Hunyadi * @remarks Licensed under GNU/GPLv3, see https://www.gnu.org/licenses/gpl-3.0.html * @see https://hunyadi.info.hu/projects/sigplus */ // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); jimport('joomla.form.fields.text'); if (version_compare(JVERSION, '4.0') >= 0) { class SigPlusNovoFormField extends Joomla\CMS\Form\FormField { } class SigPlusNovoFormTextField extends Joomla\CMS\Form\Field\TextField { } } else { class SigPlusNovoFormField extends JFormField { } class SigPlusNovoFormTextField extends JFormFieldText { } } PK j�/[Ջ��� � fields/exporter.phpnu �[��� <?php /** * @file * @brief sigplus Image Gallery Plus settings export/import control * @author Levente Hunyadi * @version 1.5.0 * @remarks Copyright (C) 2009-2023 Levente Hunyadi * @remarks Licensed under GNU/GPLv3, see https://www.gnu.org/licenses/gpl-3.0.html * @see https://hunyadi.info.hu/projects/sigplus */ /* * sigplus Image Gallery Plus plug-in for Joomla * Copyright 2009-2023 Levente Hunyadi * * sigplus is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * sigplus is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ // Check to ensure this file is within the rest of the framework defined('JPATH_BASE') or die(); require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'compat.php'; require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'constants.php'; jimport('joomla.form.formfield'); use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\Uri\Uri; /** * Renders a control for exporting and importing configuration settings. * This class implements a user-defined control in the administration backend. */ class JFormFieldExporter extends SigPlusNovoFormField { protected $type = 'Exporter'; public function getInput() { $html = ''; $scriptpath = JPATH_ROOT.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.'content'.DIRECTORY_SEPARATOR.SIGPLUS_PLUGIN_FOLDER.DIRECTORY_SEPARATOR.'fields'; if (file_exists($scriptpath.DIRECTORY_SEPARATOR.'js'.DIRECTORY_SEPARATOR.'exporter.min.js') || file_exists($scriptpath.DIRECTORY_SEPARATOR.'js'.DIRECTORY_SEPARATOR.'exporter.js')) { // get identifiers $class = ( isset($this->element['class']) ? (string)$this->element['class'] : 'form-control' ); $ctrlid = str_replace(array('][','[',']'), array('_','_',''), $this->name); $exportctrlid = $ctrlid.'-export'; $importctrlid = $ctrlid.'-import'; // generate HTML output $html .= '<button type="button" id="'.$exportctrlid.'">'.Text::_('SIGPLUS_SETTINGS_EXPORT').'</button>'. '<button type="button" id="'.$importctrlid.'">'.Text::_('SIGPLUS_SETTINGS_IMPORT').'</button>'. '<br /><textarea class="'.$class.'" id="'.$ctrlid.'" rows="10" cols="40"></textarea>'; // add script declaration to header $document = Factory::getDocument(); if (file_exists($scriptpath.DIRECTORY_SEPARATOR.'js'.DIRECTORY_SEPARATOR.'exporter.min.js') && filemtime($scriptpath.DIRECTORY_SEPARATOR.'js'.DIRECTORY_SEPARATOR.'exporter.min.js') >= filemtime($scriptpath.DIRECTORY_SEPARATOR.'js'.DIRECTORY_SEPARATOR.'exporter.js')) { $document->addScript(Uri::root(true).'/plugins/content/'.SIGPLUS_PLUGIN_FOLDER.'/fields/js/exporter.min.js'); } else { $document->addScript(Uri::root(true).'/plugins/content/'.SIGPLUS_PLUGIN_FOLDER.'/fields/js/exporter.js'); } $document->addScriptDeclaration('document.addEventListener("DOMContentLoaded", function () { new SettingsExporter(document.getElementById("'.$ctrlid.'"), document.getElementById("'.$exportctrlid.'"), document.getElementById("'.$importctrlid.'")); });'); } // add control to page return $html; } } PK j�/[�oB�/ / fields/constants.phpnu �[��� <?php /** * @file * @brief sigplus Image Gallery Plus global constants * @author Levente Hunyadi * @version 1.5.0 * @remarks Copyright (C) 2009-2023 Levente Hunyadi * @remarks Licensed under GNU/GPLv3, see https://www.gnu.org/licenses/gpl-3.0.html * @see https://hunyadi.info.hu/projects/sigplus */ // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); if (!defined('SIGPLUS_PLUGIN_FOLDER')) { define('SIGPLUS_PLUGIN_FOLDER', 'sigplus'); } if (!defined('SIGPLUS_MEDIA_FOLDER')) { define('SIGPLUS_MEDIA_FOLDER', 'sigplus'); } PK j�/[$�� fields/imagelibrarylist.phpnu �[��� <?php /** * @file * @brief sigplus Image Gallery Plus image processing library list control * @author Levente Hunyadi * @version 1.5.0 * @remarks Copyright (C) 2009-2023 Levente Hunyadi * @remarks Licensed under GNU/GPLv3, see https://www.gnu.org/licenses/gpl-3.0.html * @see https://hunyadi.info.hu/projects/sigplus */ /* * sigplus Image Gallery Plus plug-in for Joomla * Copyright 2009-2023 Levente Hunyadi * * sigplus is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * sigplus is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ // Check to ensure this file is within the rest of the framework defined('JPATH_BASE') or die(); require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'compat.php'; require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'constants.php'; require_once JPATH_ROOT.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.'content'.DIRECTORY_SEPARATOR.SIGPLUS_PLUGIN_FOLDER.DIRECTORY_SEPARATOR.'core'.DIRECTORY_SEPARATOR.'librarian.php'; jimport('joomla.form.formfield'); use Joomla\Utilities\ArrayHelper; use Joomla\CMS\Language\Text; /** * Renders a control that lists all supported image processing libraries. * This class represents a user-defined control in the administration backend. */ class JFormFieldImageLibraryList extends SigPlusNovoFormField { protected $type = 'ImageLibraryList'; /** * Generates an HTML @c select list with options. * @param name The value of the HTML name attribute. * @param attribs Additional HTML attributes for the <select> tag. * @param selected The key that is selected. * @return HTML for the select list. */ private function renderHtmlSelect($options, $name, $attribs = null, $selected = null) { if (is_array($attribs)) { $attribs = ArrayHelper::toString($attribs); } $html = '<select name="'. $name .'" '. $attribs .'>'; foreach ($options as $value => $textkey) { $html .= '<option '.( $selected == $value ? 'selected="selected" ' : '' ).'value="'.$value.'">'.Text::_($textkey).'</option>'; } $html .= '</select>'; return $html; } private function renderNone($text, $name, $attribs = null) { if (is_array($attribs)) { $attribs = ArrayHelper::toString($attribs); } return '<span style="color:red" '.$attribs.'><input type="hidden" name="'.$name.'" value="none" />'.Text::_($text).'</span>'; } public function getInput() { $class = ( isset($this->element['class']) ? 'class="'.(string)$this->element['class'].'"' : 'class="form-select"' ); // user-friendly names for image processing libraries $items = array(); foreach ($this->element->option as $o) { $val = (string)$o['value']; // attribute "value" $textkey = (string)$o; // element text content $items[$val] = $textkey; } // test which image processing libraries are supported $supported = array(); if (is_gd_supported()) { $supported['gd'] = 'GD'; // localized when control HTML code is generated } if (is_gmagick_supported()) { $supported['gmagick'] = 'GraphicsMagick'; } if (is_imagick_supported()) { $supported['imagick'] = 'ImageMagick'; } if (empty($supported)) { // no library is supported if (isset($items['none'])) { $textkey = $items['none']; } else { $textkey = 'none'; } return $this->renderNone($textkey, $this->name, $class); } else { // at least a single library is supported $supported['default'] = 'default'; foreach ($items as $key => $textkey) { if (isset($supported[$key])) { $supported[$key] = $textkey; } } return $this->renderHtmlSelect($supported, $this->name, $class, $this->value); } } } PK j�/[wtW� fields/index.htmlnu �[��� <html><body></body></html>PK j�/[�$� fields/dimension.phpnu �[��� <?php /** * @file * @brief sigplus Image Gallery Plus CSS dimension value control * @author Levente Hunyadi * @version 1.5.0 * @remarks Copyright (C) 2009-2023 Levente Hunyadi * @remarks Licensed under GNU/GPLv3, see https://www.gnu.org/licenses/gpl-3.0.html * @see https://hunyadi.info.hu/projects/sigplus */ /* * sigplus Image Gallery Plus plug-in for Joomla * Copyright 2009-2023 Levente Hunyadi * * sigplus is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * sigplus is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ // Check to ensure this file is within the rest of the framework defined('JPATH_BASE') or die(); require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'compat.php'; jimport('joomla.form.fields.text'); use Joomla\CMS\Language\Text; /** * Renders a control for specifying a CSS dimension value. * This class implements a user-defined control in the administration backend. */ class JFormFieldDimension extends SigPlusNovoFormTextField { protected $type = 'Dimension'; protected function getInput() { // initialize some field attributes $size = $this->element['size'] ? ' size="'.(int)$this->element['size'].'"' : ''; $maxLength = $this->element['maxlength'] ? ' maxlength="'.(int) $this->element['maxlength'].'"' : ''; $readonly = ((string) $this->element['readonly'] == 'true') ? ' readonly="readonly"' : ''; $disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : ''; $placeholder = ' placeholder="'.Text::_($this->element['placeholder'] ? $this->element['placeholder'] : 'JDEFAULT').'"'; // initialize JavaScript field attributes $onchange = $this->element['onchange'] ? ' onchange="'.(string) $this->element['onchange'].'"' : ''; return '<input'. ' type="text"'. ' name="'.$this->name.'"'. ' id="'.$this->id.'"'. ' value="'.htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8').'"'. ' class="'.($this->element['class'] ? (string)$this->element['class'] : 'form-control').'"'. $size.$placeholder.$disabled.$readonly.$onchange.$maxLength. '/>'; } } PK j�/[wtW� tmpl/index.htmlnu �[��� <html><body></body></html>PK j�/[�8Z&� � tmpl/default.phpnu �[��� <?php /** * @file * @brief sigplus Image Gallery Plus module for Joomla * @author Levente Hunyadi * @version 1.5.0 * @remarks Copyright (C) 2009-2023 Levente Hunyadi * @remarks Licensed under GNU/GPLv3, see https://www.gnu.org/licenses/gpl-3.0.html * @see https://hunyadi.info.hu/projects/sigplus */ defined('_JEXEC') or die; ?><div class="mod_sigplus"><?php print $gallery_html; ?></div><?php PK j�/[.�u_G _G mod_sigplus.xmlnu �[��� <?xml version="1.0" encoding="UTF-8"?> <extension type="module" client="site" method="upgrade"> <name>sigplus</name> <author>Levente Hunyadi</author> <creationDate>Mar 09, 2024</creationDate> <copyright>© 2009-2022 Levente Hunyadi. All rights reserved.</copyright> <license>GNU/GPLv3 https://www.gnu.org/licenses/gpl-3.0.html</license> <authorUrl>https://hunyadi.info.hu/projects/sigplus</authorUrl> <version>1.5.0.300</version> <downloadUrl>https://bitbucket.org/hunyadi/sigplus/downloads/</downloadUrl> <description>MOD_SIGPLUS_DESCRIPTION</description> <files> <filename module="mod_sigplus">mod_sigplus.php</filename> <filename>index.html</filename> <filename>helper.php</filename> <folder>fields</folder> <folder>tmpl</folder> </files> <scriptfile>script.php</scriptfile> <languages folder="language"> <language tag="en-GB">en-GB/en-GB.mod_sigplus.ini</language> <language tag="de-DE">de-DE/de-DE.mod_sigplus.ini</language> <language tag="fr-FR">fr-FR/fr-FR.mod_sigplus.ini</language> <language tag="ru-RU">ru-RU/ru-RU.mod_sigplus.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic" label="SIGPLUS_FIELDSET_BASIC"> <field name="source" type="text" default="sampledata/parks/landscape" label="SIGPLUS_SOURCE" description="SIGPLUS_SOURCE_DESCRIPTION" /> <field type="spacer" label="SIGPLUS_CATEGORY_LAYOUT" /> <field name="layout" type="list" default="fixed" label="SIGPLUS_LAYOUT" description="SIGPLUS_LAYOUT_DESCRIPTION"> <option value="fixed">SIGPLUS_LAYOUT_FIXED</option> <option value="flow">SIGPLUS_LAYOUT_FLOW</option> <option value="packed">SIGPLUS_LAYOUT_PACKED</option> </field> <field name="rows" type="text" default="1" showon="layout:fixed" label="SIGPLUS_ROWS" description="SIGPLUS_ROWS_DESCRIPTION" /> <field name="cols" type="text" default="1" showon="layout:fixed" label="SIGPLUS_COLUMNS" description="SIGPLUS_COLUMNS_DESCRIPTION" /> <field name="maxcount" type="text" default="0" label="SIGPLUS_MAXCOUNT" description="SIGPLUS_MAXCOUNT_DESCRIPTION" /> <field type="spacer" label="SIGPLUS_CATEGORY_ALIGNMENT" /> <field name="alignment" type="list" default="center" label="SIGPLUS_ALIGNMENT" description="SIGPLUS_ALIGNMENT_DESCRIPTION"> <option value="before-clear">SIGPLUS_ALIGNMENT_BEFORE</option> <option value="center">SIGPLUS_ALIGNMENT_CENTER</option> <option value="after-clear">SIGPLUS_ALIGNMENT_AFTER</option> </field> <field type="spacer" label="SIGPLUS_CATEGORY_PREVIEW" /> <field name="preview_width" type="text" default="200" label="SIGPLUS_PREVIEW_WIDTH" description="SIGPLUS_PREVIEW_WIDTH_DESCRIPTION" /> <field name="preview_height" type="text" default="200" label="SIGPLUS_PREVIEW_HEIGHT" description="SIGPLUS_PREVIEW_HEIGHT_DESCRIPTION" /> <field name="preview_crop" type="radio" default="0" label="SIGPLUS_PREVIEW_CROP" description="SIGPLUS_PREVIEW_CROP_DESCRIPTION"> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field type="spacer" label="SIGPLUS_CATEGORY_LIGHTBOX" /> <field name="lightbox" type="groupedlist" default="boxplus/light" label="SIGPLUS_LIGHTBOX" description="SIGPLUS_LIGHTBOX_DESCRIPTION"> <option value="none">SIGPLUS_LIGHTBOX_NONE</option> <group label="SIGPLUS_BOXPLUS"> <option value="boxplus/light">SIGPLUS_BOXPLUS_LIGHT</option> <option value="boxplus/dark">SIGPLUS_BOXPLUS_DARK</option> </group> <option value="fancybox">SIGPLUS_FANCYBOX</option> <option value="fancybox3">SIGPLUS_FANCYBOX3</option> <option value="hoverplus">SIGPLUS_HOVERPLUS</option> <option value="slimbox2">SIGPLUS_SLIMBOX2</option> <option value="bootstrap">SIGPLUS_BOOTSTRAP</option> </field> <field name="lightbox_autocenter" type="radio" default="1" label="SIGPLUS_LIGHTBOX_AUTOCENTER" description="SIGPLUS_LIGHTBOX_AUTOCENTER_DESCRIPTION"> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="lightbox_autofit" type="radio" default="1" label="SIGPLUS_LIGHTBOX_AUTOFIT" description="SIGPLUS_LIGHTBOX_AUTOFIT_DESCRIPTION"> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="lightbox_thumbs" type="list" default="inside" label="SIGPLUS_LIGHTBOX_THUMBS" description="SIGPLUS_LIGHTBOX_THUMBS_DESCRIPTION"> <option value="inside">SIGPLUS_LIGHTBOX_THUMBS_INSIDE</option> <option value="outside">SIGPLUS_LIGHTBOX_THUMBS_OUTSIDE</option> <option value="none">JHIDE</option> </field> <field name="lightbox_slideshow" type="text" default="0" label="SIGPLUS_LIGHTBOX_SLIDESHOW" description="SIGPLUS_LIGHTBOX_SLIDESHOW_DESCRIPTION" /> <field name="lightbox_autostart" type="radio" default="0" showon="lightbox_slideshow!:0" label="SIGPLUS_LIGHTBOX_AUTOSTART" description="SIGPLUS_LIGHTBOX_AUTOSTART_DESCRIPTION"> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field type="spacer" label="SIGPLUS_CATEGORY_ROTATOR" /> <field name="rotator_orientation" type="list" default="vertical" showon="layout:fixed,packed" label="SIGPLUS_ROTATOR_ORIENTATION" description="SIGPLUS_ROTATOR_ORIENTATION_DESCRIPTION"> <option value="horizontal">SIGPLUS_ROTATOR_ORIENTATION_HORIZONTAL</option> <option value="vertical">SIGPLUS_ROTATOR_ORIENTATION_VERTICAL</option> </field> <field name="rotator_buttons" type="radio" default="1" showon="layout:fixed" label="SIGPLUS_ROTATOR_BUTTONS" description="SIGPLUS_ROTATOR_BUTTONS_DESCRIPTION"> <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="rotator_navigation" type="list" default="bottom" showon="layout:fixed" label="SIGPLUS_ROTATOR_NAVIGATION" description="SIGPLUS_ROTATOR_NAVIGATION_DESCRIPTION"> <option value="bottom">SIGPLUS_ROTATOR_NAVIGATION_BOTTOM</option> <option value="top">SIGPLUS_ROTATOR_NAVIGATION_TOP</option> <option value="none">SIGPLUS_ROTATOR_NAVIGATION_NONE</option> <option value="both">SIGPLUS_ROTATOR_NAVIGATION_BOTH</option> </field> <field name="rotator_links" type="radio" default="1" showon="layout:fixed" label="SIGPLUS_ROTATOR_LINKS" description="SIGPLUS_ROTATOR_LINKS_DESCRIPTION"> <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="rotator_trigger" type="list" default="click" showon="layout:fixed" label="SIGPLUS_ROTATOR_TRIGGER" description="SIGPLUS_ROTATOR_TRIGGER_DESCRIPTION"> <option value="click">SIGPLUS_ROTATOR_TRIGGER_CLICK</option> <option value="mouseover">SIGPLUS_ROTATOR_TRIGGER_MOUSEOVER</option> </field> <field name="rotator_step" type="list" default="single" showon="layout:fixed" label="SIGPLUS_ROTATOR_STEP" description="SIGPLUS_ROTATOR_STEP_DESCRIPTION"> <option value="single">SIGPLUS_ROTATOR_STEP_SINGLE</option> <option value="page">SIGPLUS_ROTATOR_STEP_PAGE</option> </field> <field name="rotator_duration" type="text" default="800" showon="layout:fixed" label="SIGPLUS_ROTATOR_DURATION" description="SIGPLUS_ROTATOR_DURATION_DESCRIPTION" /> <field name="rotator_delay" type="text" default="0" showon="layout:fixed" label="SIGPLUS_ROTATOR_DELAY" description="SIGPLUS_ROTATOR_DELAY_DESCRIPTION" /> <field name="loop" type="radio" default="1" label="SIGPLUS_LOOP" description="SIGPLUS_LOOP_DESCRIPTION"> <option value="1">JON</option> <option value="0">JOFF</option> </field> <field type="spacer" label="SIGPLUS_CATEGORY_CAPTION" /> <field name="caption_visibility" type="list" default="mouseover" label="SIGPLUS_CAPTION_VISIBILITY" description="SIGPLUS_CAPTION_VISIBILITY_DESCRIPTION"> <option value="none">SIGPLUS_CAPTION_NONE</option> <option value="mouseover">SIGPLUS_CAPTION_MOUSEOVER</option> <option value="always">SIGPLUS_CAPTION_ALWAYS</option> </field> <field name="caption_position" type="list" default="overlay" showon="caption_visibility!:none" label="SIGPLUS_CAPTION_POSITION" description="SIGPLUS_CAPTION_POSITION_DESCRIPTION"> <option value="overlay-bottom">SIGPLUS_CAPTION_OVERLAY_BOTTOM</option> <option value="overlay-top">SIGPLUS_CAPTION_OVERLAY_TOP</option> <option value="below">SIGPLUS_CAPTION_BELOW</option> <option value="above">SIGPLUS_CAPTION_ABOVE</option> </field> <field name="caption_title" type="textarea" cols="40" label="SIGPLUS_CAPTION_TITLE_DEFAULT" description="SIGPLUS_CAPTION_TITLE_DEFAULT_DESCRIPTION" filter="raw" /> <field name="caption_summary" type="textarea" cols="40" label="SIGPLUS_CAPTION_SUMMARY_DEFAULT" description="SIGPLUS_CAPTION_SUMMARY_DEFAULT_DESCRIPTION" filter="raw" /> </fieldset> <fieldset name="advanced" label="SIGPLUS_FIELDSET_ADVANCED" addfieldpath="modules/mod_sigplus/fields/"> <field type="spacer" label="SIGPLUS_CATEGORY_DOWNLOAD" /> <field name="download" type="accesslevel" default="" label="SIGPLUS_DOWNLOAD" description="SIGPLUS_DOWNLOAD_DESCRIPTION"> <option value="">JDISABLED</option> </field> <field name="metadata" type="accesslevel" default="" label="SIGPLUS_METADATA" description="SIGPLUS_METADATA_DESCRIPTION"> <option value="">JDISABLED</option> </field> <field name="protection" type="radio" default="0" label="SIGPLUS_PROTECTION" description="SIGPLUS_PROTECTION_DESCRIPTION"> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field type="spacer" label="SIGPLUS_CATEGORY_PREVIEW_STYLE" /> <field name="preview_margin" type="dimension" size="6" label="SIGPLUS_CSS_MARGIN" description="SIGPLUS_CSS_MARGIN_DESCRIPTION" /> <field name="preview_border_style" type="list" default="" label="SIGPLUS_CSS_BORDER_STYLE" description="SIGPLUS_CSS_BORDER_STYLE_DESCRIPTION"> <option value="">SIGPLUS_CSS_BORDER_DEFAULT</option> <option value="none">SIGPLUS_CSS_BORDER_NONE</option> <option value="dotted">SIGPLUS_CSS_BORDER_DOTTED</option> <option value="dashed">SIGPLUS_CSS_BORDER_DASHED</option> <option value="solid">SIGPLUS_CSS_BORDER_SOLID</option> <option value="double">SIGPLUS_CSS_BORDER_DOUBLE</option> <option value="groove">SIGPLUS_CSS_BORDER_GROOVE</option> <option value="ridge">SIGPLUS_CSS_BORDER_RIDGE</option> <option value="inset">SIGPLUS_CSS_BORDER_INSET</option> <option value="outset">SIGPLUS_CSS_BORDER_OUTSET</option> </field> <field name="preview_border_width" type="dimension" size="6" showon="preview_border_style!:none" label="SIGPLUS_CSS_BORDER_WIDTH" description="SIGPLUS_CSS_BORDER_WIDTH_DESCRIPTION" /> <field name="preview_border_color" type="color" showon="preview_border_style!:none" label="SIGPLUS_CSS_BORDER_COLOR" description="SIGPLUS_CSS_BORDER_COLOR_DESCRIPTION" /> <field name="preview_padding" type="dimension" size="6" label="SIGPLUS_CSS_PADDING" description="SIGPLUS_CSS_PADDING_DESCRIPTION" /> <field type="spacer" label="SIGPLUS_CATEGORY_SORTING" /> <field name="sort_criterion" type="list" default="labels-filename" label="SIGPLUS_SORT_CRITERION" description="SIGPLUS_SORT_CRITERION_DESCRIPTION"> <option value="labels-filename">SIGPLUS_SORT_CRITERION_LABELS_FILENAME</option> <option value="labels-mtime">SIGPLUS_SORT_CRITERION_LABELS_MTIME</option> <option value="labels-filesize">SIGPLUS_SORT_CRITERION_LABELS_FILESIZE</option> <option value="labels-random">SIGPLUS_SORT_CRITERION_LABELS_RANDOM</option> <option value="labels">SIGPLUS_SORT_CRITERION_LABELS</option> <option value="filename">SIGPLUS_SORT_CRITERION_FILENAME</option> <option value="mtime">SIGPLUS_SORT_CRITERION_MTIME</option> <option value="filesize">SIGPLUS_SORT_CRITERION_FILESIZE</option> <option value="random">SIGPLUS_SORT_CRITERION_RANDOM</option> </field> <field name="sort_order" type="list" default="0" showon="sort_criterion!:random" label="SIGPLUS_SORT_ORDER" description="SIGPLUS_SORT_ORDER_DESCRIPTION"> <option value="0">SIGPLUS_SORT_ORDER_ASCENDING</option> <option value="1">SIGPLUS_SORT_ORDER_DESCENDING</option> </field> <field name="depth" type="number" min="-1" step="0" default="0" label="SIGPLUS_DEPTH" description="SIGPLUS_DEPTH_DESCRIPTION" /> <field type="spacer" label="SIGPLUS_CATEGORY_WATERMARK" /> <field name="watermark_position" type="list" default="" label="SIGPLUS_WATERMARK_POSITION" description="SIGPLUS_WATERMARK_POSITION_DESCRIPTION"> <option value="">SIGPLUS_ALIGNMENT_NONE</option> <option value="n">SIGPLUS_ALIGNMENT_NORTH</option> <option value="ne">SIGPLUS_ALIGNMENT_NORTHEAST</option> <option value="e">SIGPLUS_ALIGNMENT_EAST</option> <option value="se">SIGPLUS_ALIGNMENT_SOUTHEAST</option> <option value="s">SIGPLUS_ALIGNMENT_SOUTH</option> <option value="sw">SIGPLUS_ALIGNMENT_SOUTHWEST</option> <option value="w">SIGPLUS_ALIGNMENT_WEST</option> <option value="nw">SIGPLUS_ALIGNMENT_NORTHWEST</option> <option value="c">SIGPLUS_ALIGNMENT_CENTER</option> </field> <field name="watermark_x" type="text" showon="watermark_position!:,c,n,s" label="SIGPLUS_WATERMARK_X" description="SIGPLUS_WATERMARK_X_DESCRIPTION" /> <field name="watermark_y" type="text" showon="watermark_position!:,c,e,w" label="SIGPLUS_WATERMARK_Y" description="SIGPLUS_WATERMARK_Y_DESCRIPTION" /> <field name="watermark_source" type="text" default="watermark.png" showon="watermark_position:n,ne,e,se,s,sw,w,nw,c" label="SIGPLUS_WATERMARK_SOURCE" description="SIGPLUS_WATERMARK_SOURCE_DESCRIPTION" /> <field type="spacer" label="SIGPLUS_CATEGORY_THUMBNAIL" /> <field name="thumb_width" type="text" default="60" label="SIGPLUS_THUMB_WIDTH" description="SIGPLUS_THUMB_WIDTH_DESCRIPTION" /> <field name="thumb_height" type="text" default="60" label="SIGPLUS_THUMB_HEIGHT" description="SIGPLUS_THUMB_HEIGHT_DESCRIPTION" /> <field name="thumb_crop" type="radio" default="0" label="SIGPLUS_THUMB_CROP" description="SIGPLUS_THUMB_CROP_DESCRIPTION"> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field type="spacer" label="SIGPLUS_CATEGORY_LIGHTBOX_ADVANCED" /> <field name="lightbox_transition" type="list" default="sine" label="SIGPLUS_LIGHTBOX_TRANSITION" description="SIGPLUS_LIGHTBOX_TRANSITION_DESCRIPTION"> <option value="linear">SIGPLUS_TRANSITION_LINEAR</option> <option value="quad">SIGPLUS_TRANSITION_QUAD</option> <option value="cubic">SIGPLUS_TRANSITION_CUBIC</option> <option value="quart">SIGPLUS_TRANSITION_QUART</option> <option value="quint">SIGPLUS_TRANSITION_QUINT</option> <option value="expo">SIGPLUS_TRANSITION_EXPO</option> <option value="circ">SIGPLUS_TRANSITION_CIRC</option> <option value="sine">SIGPLUS_TRANSITION_SINE</option> <option value="back">SIGPLUS_TRANSITION_BACK</option> <option value="bounce">SIGPLUS_TRANSITION_BOUNCE</option> <option value="elastic">SIGPLUS_TRANSITION_ELASTIC</option> </field> <field type="spacer" showon="layout:fixed" label="SIGPLUS_CATEGORY_ROTATOR_ADVANCED" /> <field name="rotator_alignment" type="list" default="center" showon="layout:fixed" label="SIGPLUS_ROTATOR_ALIGNMENT" description="SIGPLUS_ROTATOR_ALIGNMENT_DESCRIPTION"> <option value="c">SIGPLUS_ALIGNMENT_CENTER</option> <option value="n">SIGPLUS_ALIGNMENT_NORTH</option> <option value="ne">SIGPLUS_ALIGNMENT_NORTHEAST</option> <option value="e">SIGPLUS_ALIGNMENT_EAST</option> <option value="se">SIGPLUS_ALIGNMENT_SOUTHEAST</option> <option value="s">SIGPLUS_ALIGNMENT_SOUTH</option> <option value="sw">SIGPLUS_ALIGNMENT_SOUTHWEST</option> <option value="w">SIGPLUS_ALIGNMENT_WEST</option> <option value="nw">SIGPLUS_ALIGNMENT_NORTHWEST</option> </field> <field name="rotator_transition" type="list" default="sine" showon="layout:fixed" label="SIGPLUS_ROTATOR_TRANSITION" description="SIGPLUS_ROTATOR_TRANSITION_DESCRIPTION"> <option value="linear">SIGPLUS_TRANSITION_LINEAR</option> <option value="quad">SIGPLUS_TRANSITION_QUAD</option> <option value="cubic">SIGPLUS_TRANSITION_CUBIC</option> <option value="quart">SIGPLUS_TRANSITION_QUART</option> <option value="quint">SIGPLUS_TRANSITION_QUINT</option> <option value="expo">SIGPLUS_TRANSITION_EXPO</option> <option value="circ">SIGPLUS_TRANSITION_CIRC</option> <option value="sine">SIGPLUS_TRANSITION_SINE</option> <option value="back">SIGPLUS_TRANSITION_BACK</option> <option value="bounce">SIGPLUS_TRANSITION_BOUNCE</option> <option value="elastic">SIGPLUS_TRANSITION_ELASTIC</option> </field> <field type="spacer" label="SIGPLUS_CATEGORY_CAPTION_TEMPLATE" /> <field name="caption_title_template" type="textarea" cols="40" label="SIGPLUS_CAPTION_TITLE_TEMPLATE" description="SIGPLUS_CAPTION_TITLE_TEMPLATE_DESCRIPTION" filter="raw" /> <field name="caption_summary_template" type="textarea" cols="40" default="{$text} ({$current}/{$total})" label="SIGPLUS_CAPTION_SUMMARY_TEMPLATE" description="SIGPLUS_CAPTION_SUMMARY_TEMPLATE_DESCRIPTION" filter="raw" /> <field type="spacer" label="SIGPLUS_CATEGORY_FOLDER" /> <field name="caption_source" type="text" default="labels.txt" label="SIGPLUS_CAPTION_SOURCE" description="SIGPLUS_CAPTION_SOURCE_DESCRIPTION" /> <field name="quality" type="text" default="85" label="SIGPLUS_IMAGE_QUALITY" description="SIGPLUS_IMAGE_QUALITY_DESCRIPTION" /> <field type="spacer" label="SIGPLUS_CATEGORY_MODULE" /> <field name="id" type="text" label="SIGPLUS_IDENTIFIER" description="SIGPLUS_IDENTIFIER_DESCRIPTION" /> <field name="moduleclass_sfx" type="textarea" rows="3" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="SIGPLUS_MODULE_CLASS" /> <field name="settings" type="textarea" cols="40" label="SIGPLUS_SETTINGS_ADDITIONAL" description="SIGPLUS_SETTINGS_ADDITIONAL_DESCRIPTION" /> <field type="spacer" label="SIGPLUS_CATEGORY_BACKUP_RESTORE" /> <field name="settings_exporter" type="exporter" label="SIGPLUS_SETTINGS_MIGRATE" description="SIGPLUS_SETTINGS_MIGRATE_DESCRIPTION" /> </fieldset> </fields> </config> </extension> PK j�/[���G mod_sigplus.phpnu �[��� <?php /** * @file * @brief sigplus Image Gallery Plus module for Joomla * @author Levente Hunyadi * @version 1.5.0 * @remarks Copyright (C) 2009-2023 Levente Hunyadi * @remarks Licensed under GNU/GPLv3, see https://www.gnu.org/licenses/gpl-3.0.html * @see https://hunyadi.info.hu/projects/sigplus */ /* * sigplus Image Gallery Plus module for Joomla * Copyright 2009-2023 Levente Hunyadi * * sigplus is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * sigplus is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ // no direct access defined('_JEXEC') or die('Restricted access'); if (!defined('SIGPLUS_VERSION_MODULE')) { define('SIGPLUS_VERSION_MODULE', '1.5.0'); } if (!defined('SIGPLUS_PLUGIN_FOLDER')) { define('SIGPLUS_PLUGIN_FOLDER', 'sigplus'); } if (!defined('SIGPLUS_DEBUG')) { // Triggers debug mode. Debug uses uncompressed version of scripts rather than the bandwidth-saving minified versions. define('SIGPLUS_DEBUG', false); } if (!defined('SIGPLUS_LOGGING')) { // Triggers logging mode. Verbose status messages are printed to the output. define('SIGPLUS_LOGGING', false); } // include the helper file require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'helper.php'; use Joomla\CMS\Factory; $gallery_html = false; try { // import dependencies if (($core = SigPlusNovoModuleHelper::import()) !== false) { $core->setParameterObject($params); // get parameters from the module's configuration try { if ($params instanceof stdClass) { $imagesource = $params->source; } else if ($params instanceof Joomla\Registry\Registry) { $imagesource = $params->get('source'); } // download image try { if ($core->downloadImage($imagesource)) { // an image has been requested for download jexit(); // do not produce a page } } catch (SigPlusNovoImageDownloadAccessException $e) { // signal download errors but do not stop page processing $app = Factory::getApplication(); $app->enqueueMessage($e->getMessage(), 'error'); } // generate image gallery $gallery_html = $core->getGalleryHTML($imagesource, $id); $core->addStyles($id); $core->addScripts($id); $core->resetParameters(); } catch (Exception $e) { $core->resetParameters(); throw $e; } } // an error message has already been printed by another module instance } catch (Exception $e) { $app = Factory::getApplication(); $app->enqueueMessage($e->getMessage(), 'error'); $gallery_html = $e->getMessage(); } require Joomla\CMS\Helper\ModuleHelper::getLayoutPath('mod_sigplus', $params->get('layout', 'default')); PK j�/[U ^�� � helper.phpnu �[��� PK j�/[wtW� ! index.htmlnu �[��� PK j�/[�hP\� � u script.phpnu �[��� PK j�/[�c�(� � �&