| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /inetpub/wwwroot/icd/plugins/editors-xtd/slider/ |
Upload File : |
<?php
/**
* Main Plugin File
* Does all the magic!
*
* @package Slider editor button
* @version 1.6.0
*
* @author Peter van Westen <peter@nonumber.nl>
* @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();
// Import library dependencies
jimport( 'joomla.plugin.plugin' );
/**
** Plugin that places the button
*/
class plgButtonSlider extends JPlugin
{
/**
* Display the button
*
* @return array A two element array of ( imageName, textToInsert )
*/
function onDisplay( $name )
{
jimport( 'joomla.filesystem.file' );
// return if system plugin is not installed
if ( !JFile::exists( JPATH_PLUGINS.DS.'system'.DS.$this->_name.DS.$this->_name.'.php' ) ) {
return;
}
// return if NoNumber! Framework plugin is not installed
if ( !JFile::exists( JPATH_PLUGINS.DS.'system'.DS.'nnframework'.DS.'nnframework.php' ) ) {
return;
}
// 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_'.$this->_type.'_'.$this->_name, JPATH_ADMINISTRATOR, 'en-GB' );
}
$lang->load( 'plg_'.$this->_type.'_'.$this->_name, JPATH_ADMINISTRATOR, null, 1 );
// Load system plugin parameters
require_once JPATH_PLUGINS.DS.'system'.DS.'nnframework'.DS.'helpers'.DS.'parameters.php';
$parameters =& NNParameters::getParameters();
$system_params = JPluginHelper::getPlugin( 'system', $this->_name );
$params = $parameters->getParams( $system_params->params, JPATH_PLUGINS.DS.'system'.DS.$this->_name.'.xml' );
// Include the Helper
require_once JPATH_PLUGINS.DS.$this->_type.DS.$this->_name.DS.'helper.php';
$class = get_class( $this ).'Helper';
$this->helper = new $class( $params );
return $this->helper->render( $name );
}
}