/** * Constructor activating the default information of the class * * @access protected */ function __construct() { // Call parent parent::__construct(); $db =& JFactory::getDBO(); $plugin = JRequest::getVar('plugin'); if ($plugin) { $query = "SELECT id" . " FROM #__jce_plugins" . " WHERE name = '" . $plugin . "'"; $db->setQuery($query); $id = $db->loadResult(); $this->plugin = new JObject(); $this->plugin->name = $plugin; $this->plugin->id = $id; $this->plugin->params = $this->getPluginParams(); $this->plugin->type = JRequest::getVar('type', 'standard'); define('JCE_PLUGIN', JCE_PLUGINS . DS . $plugin); } else { die(JError::raiseError(403, JText::_('Access Forbidden'))); } // Set javascript file array $this->script(array('tiny_mce_popup'), 'tiny_mce'); $this->script(array('mootools', 'tiny_mce_utils', 'jce', 'plugin', 'window'), 'libraries'); $this->css(array('plugin')); $this->css(array('window', 'dialog'), 'skins'); }
/** * Constructor activating the default information of the class * * @access protected */ function __construct() { // Call parent parent::__construct(); $db =& JFactory::getDBO(); $plugin = JRequest::getVar('plugin'); if ($plugin) { $query = "SELECT id" . " FROM #__jce_plugins" . " WHERE name = '" . $plugin . "'"; $db->setQuery($query); $id = $db->loadResult(); $this->plugin = new JObject(); $this->plugin->name = $plugin; $this->plugin->id = $id; $this->plugin->params = $this->getPluginParams(); $this->plugin->type = JRequest::getVar('type', 'standard'); define('JCE_PLUGIN', JCE_PLUGINS . DS . $plugin); } else { die(JError::raiseError(403, JText::_('Access Forbidden'))); } }