Spade

Mini Shell

Directory:~$ /home/lmsyaran/public_html/joomla4/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/public_html/joomla4/preset.zip

PK%��[uɥ��/language/en-GB/en-GB.plg_gantry5_preset.sys.ininu�[���PLG_GANTRY5_PRESET="Gantry
5 - Presets"
PLG_GANTRY5_PRESET_DESCRIPTION="Enable Gantry 5 presets selection by
appending variable to the URL."

PLG_GANTRY5_OPTION_PRESET_LABEL="Preset action"
PLG_GANTRY5_OPTION_PRESET_DESC="Variable name for setting preset.
Defaults to '?presets=xxx', where xxx is the name of the
preset."
PLG_GANTRY5_OPTION_RESET_LABEL="Reset action"
PLG_GANTRY5_OPTION_RESET_DESC="Variable name for resetting preset.
Defaults to '?reset-settings'."
PK%��[�b���MD5SUMSnu�[���preset.php	375b207b98844b9d52b4568047dd0cf5
language/en-GB/en-GB.plg_gantry5_preset.sys.ini	027a921657ca1866f0578725b1e71eb5
MD5SUMS	d41d8cd98f00b204e9800998ecf8427e
preset.xml	993ec956bdf6abca05b3ec2d8655f613
PK%��[�F�#��
preset.phpnu�[���<?php
/**
 * @package   Gantry 5
 * @author    RocketTheme http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2017 RocketTheme, LLC
 * @license   GNU/GPLv2 and later
 *
 * http://www.gnu.org/licenses/gpl-2.0.html
 */
defined('_JEXEC') or die;

class plgGantry5Preset extends JPlugin
{
    public function __construct(&$subject, $config)
    {
        // Do not load if Gantry libraries are not installed or
initialised.
        if (!class_exists('Gantry5\Loader')) return;

        parent::__construct($subject, $config);

        // Always load language.
        $lang = JFactory::getLanguage();
        $lang->load('com_gantry5.sys') ||
$lang->load('com_gantry5.sys', JPATH_ADMINISTRATOR .
'/components/com_gantry5');
        $this->loadLanguage('plg_quickicon_gantry5.sys');
    }

    public function onGantry5ThemeInit($theme)
    {
        $app = JFactory::getApplication();

        if ($app->isSite()) {
            $input = $app->input;

            $cookie = md5($theme->name);
            $presetVar = $this->params->get('preset',
'presets');
            $resetVar = $this->params->get('reset',
'reset-settings');

            if ($input->getCmd($resetVar) !== null) {
                $preset = false;
            } else {
                $preset = $input->getCmd($presetVar);
            }


            if ($preset !== null) {
                if ($preset === false) {
                    // Invalidate the cookie.
                    $this->updateCookie($cookie, false, time() - 42000);
                } else {
                    // Update the cookie.
                    $this->updateCookie($cookie, $preset, 0);
                }
            } else {
                $preset = $input->cookie->getString($cookie);
            }

            $theme->setPreset($preset);
        }
    }

    public function onGantry5UpdateCss($theme)
    {
        $cookie = md5($theme->name);

        $this->updateCookie($cookie, false, time() - 42000);
    }

    protected function updateCookie($name, $value, $expire = 0)
    {
        $app = JFactory::getApplication();
        $path   = $app->get('cookie_path', '/');
        $domain = $app->get('cookie_domain');

        $input = $app->input;
        $input->cookie->set($name, $value, $expire, $path, $domain);
    }
}
PK%��[�FL��
preset.xmlnu�[���<?xml version="1.0"
encoding="UTF-8" standalone="no"?>
<extension version="3.4" type="plugin"
group="gantry5" method="upgrade">
    <name>plg_gantry5_preset</name>
    <version>5.4.37</version>
    <creationDate>January 25, 2021</creationDate>
    <author>RocketTheme, LLC</author>
    <authorEmail>support@rockettheme.com</authorEmail>
    <authorUrl>http://www.rockettheme.com</authorUrl>
    <copyright>(C) 2005 - 2019 RocketTheme, LLC. All rights
reserved.</copyright>
    <license>http://www.gnu.org/licenses/gpl-2.0.html
GNU/GPL</license>
    <description>PLG_GANTRY5_PRESET_DESCRIPTION</description>

    <files>
        <filename
plugin="preset">preset.php</filename>
        <folder>language</folder>
    </files>

    <config>
        <fields name="params">
            <fieldset name="basic">
                <field name="preset"
                       type="text"
                       default="presets"
                      
description="PLG_GANTRY5_OPTION_PRESET_DESC"
                       label="PLG_GANTRY5_OPTION_PRESET_LABEL"
                        />
                <field name="reset"
                       type="text"
                       default="reset-settings"
                      
description="PLG_GANTRY5_OPTION_RESET_DESC"
                       label="PLG_GANTRY5_OPTION_RESET_LABEL"
                        />
            </fieldset>
        </fields>
    </config>
</extension>
PK%��[uɥ��/language/en-GB/en-GB.plg_gantry5_preset.sys.ininu�[���PK%��[�b���2MD5SUMSnu�[���PK%��[�F�#��
;preset.phpnu�[���PK%��[�FL��
epreset.xmlnu�[���PKJ*