if ( $user->get( 'guest' ) ) { JError::raiseError( 403, JText::_( "ALERTNOTAUTH" ) ); } require_once JPATH_PLUGINS.'/system/nnframework/helpers/parameters.php'; $parameters =& NNParameters::getParameters(); $params = $parameters->getPluginParamValues( 'modulesanywhere', 'editors-xtd' ); $mainframe =& JFactory::getApplication(); if ( $mainframe->isSite() ) { if ( !$params->enable_frontend ) { JError::raiseError( 403, JText::_( "ALERTNOTAUTH" ) ); } } $class = new plgButtonModulesAnywherePopup(); $class->render( $params ); class plgButtonModulesAnywherePopup { function render( &$params ) { $mainframe =& JFactory::getApplication(); // load the admin language file $lang =& JFactory::getLanguage(); if ( $lang->getTag() != 'en-GB' ) { // Loads English language file as fallback (for undefined stuff in other language file) $lang->load( 'plg_editors-xtd_modulesanywhere', JPATH_ADMINISTRATOR, 'en-GB' ); } $lang->load( 'plg_editors-xtd_modulesanywhere', JPATH_ADMINISTRATOR, null, 1 );
* * @package Modules Anywhere * @version 1.11.0 * * @author Peter van Westen <*****@*****.**> * @link http://www.nonumber.nl * @copyright Copyright © 2011 NoNumber! All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ // No direct access defined('_JEXEC') or die('Restricted access'); $user =& JFactory::getUser(); if ($user->get('guest')) { JError::raiseError(403, JText::_("ALERTNOTAUTH")); } $class = new plgButtonModulesAnywherePopup(); $params = $class->getPluginParamValues('modulesanywhere', 'editors-xtd'); $mainframe =& JFactory::getApplication(); if ($mainframe->isSite()) { if (!$params->enable_frontend) { JError::raiseError(403, JText::_("ALERTNOTAUTH")); } } $class->render($params); class plgButtonModulesAnywherePopup { function getPluginParamValues($name, $type = 'system') { jimport('joomla.plugin.plugin'); $plugin = JPluginHelper::getPlugin($type, $name); require_once JPATH_PLUGINS . DS . 'system' . DS . 'nonumberelements' . DS . 'helpers' . DS . 'parameters.php';