PATH:
home
/
centosnipponia
/
public_html
/
nipponiacom2
/
caribe
/
plugins
/
system
/
sourcerer
<?php /** * @package Sourcerer * @version 6.1.3 * * @author Peter van Westen <info@regularlabs.com> * @link http://www.regularlabs.com * @copyright Copyright © 2016 Regular Labs All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; /** * Plugin that replaces Sourcerer code with its HTML / CSS / JavaScript / PHP equivalent */ class PlgSystemSourcerer extends JPlugin { public function __construct(&$subject, $config) { $this->_pass = 0; parent::__construct($subject, $config); } public function onAfterRoute() { $this->_pass = 0; jimport('joomla.filesystem.file'); if (JFile::exists(JPATH_LIBRARIES . '/regularlabs/helpers/protect.php')) { require_once JPATH_LIBRARIES . '/regularlabs/helpers/protect.php'; // return if page should be protected if (RLProtect::isProtectedPage('', 1)) { return; } } // load the admin language file require_once JPATH_LIBRARIES . '/regularlabs/helpers/functions.php'; RLFunctions::loadLanguage('plg_' . $this->_type . '_' . $this->_name); // return if Regular Labs Library plugin is not installed if (!JFile::exists(JPATH_PLUGINS . '/system/regularlabs/regularlabs.php')) { if (JFactory::getApplication()->isAdmin() && JFactory::getApplication()->input->get('option') != 'com_login') { $msg = JText::_('SRC_REGULAR_LABS_LIBRARY_NOT_INSTALLED') . ' ' . JText::sprintf('SRC_EXTENSION_CAN_NOT_FUNCTION', JText::_('SOURCERER')); $mq = JFactory::getApplication()->getMessageQueue(); foreach ($mq as $m) { if ($m['message'] == $msg) { $msg = ''; break; } } if ($msg) { JFactory::getApplication()->enqueueMessage($msg, 'error'); } } return; } if (JFile::exists(JPATH_LIBRARIES . '/regularlabs/helpers/protect.php')) { require_once JPATH_LIBRARIES . '/regularlabs/helpers/protect.php'; // return if current page is an admin page if (RLProtect::isAdmin()) { return; } } else if (JFactory::getApplication()->isAdmin()) { return; } // load the site language file require_once JPATH_LIBRARIES . '/regularlabs/helpers/functions.php'; RLFunctions::loadLanguage('plg_' . $this->_type . '_' . $this->_name, JPATH_SITE); // Load plugin parameters require_once JPATH_LIBRARIES . '/regularlabs/helpers/parameters.php'; $parameters = RLParameters::getInstance(); $params = $parameters->getPluginParams($this->_name); // Include the Helper require_once JPATH_PLUGINS . '/' . $this->_type . '/' . $this->_name . '/helper.php'; $class = get_class($this) . 'Helper'; $this->_helper = new $class ($params); $this->_pass = 1; } public function onContentPrepare($context, &$article) { if ($this->_pass) { $this->_helper->onContentPrepare($article, $context); } } public function onAfterDispatch() { if ($this->_pass) { $this->_helper->onAfterDispatch(); } } public function onAfterRender() { if ($this->_pass) { $this->_helper->onAfterRender(); } } }
[+]
..
[-] helper.php
[edit]
[+]
language
[-] script.install.helper.php
[edit]
[-] script.install.php
[edit]
[-] sourcerer.php
[edit]
[-] sourcerer.xml
[edit]
[-] .htaccess.disabled
[edit]