示例#1
0
文件: plugin.php 项目: 01J/bealtine
 /**
  * Constructor activating the default information of the class
  *
  * @access	public
  */
 function __construct($config = array())
 {
     // Call parent
     parent::__construct();
     $db = JFactory::getDBO();
     // get plugin name
     $plugin = JRequest::getCmd('plugin');
     // check plugin
     if ($this->checkPlugin($plugin)) {
         $this->set('name', $plugin);
         if (!array_key_exists('type', $config)) {
             $config['type'] = 'standard';
         }
         if (!array_key_exists('base_path', $config)) {
             $config['base_path'] = WF_EDITOR_PLUGINS . '/' . $plugin;
         }
         if (!defined('WF_EDITOR_PLUGIN')) {
             define('WF_EDITOR_PLUGIN', $config['base_path']);
         }
         if (!array_key_exists('view_path', $config)) {
             $config['view_path'] = WF_EDITOR_PLUGINS . '/' . $plugin;
         }
         if (!array_key_exists('layout', $config)) {
             $config['layout'] = 'default';
         }
         if (!array_key_exists('template_path', $config)) {
             $config['template_path'] = WF_EDITOR_PLUGIN . '/tmpl';
         }
         $this->setProperties($config);
     } else {
         die(JError::raiseError(403, 'RESTRICTED ACCESS'));
     }
 }
示例#2
0
 /**
  * Constructor activating the default information of the class
  * @access	protected
  */
 public function __construct()
 {
     // Call parent
     parent::__construct();
     $dialog = JRequest::getWord('dialog');
     $theme = JRequest::getWord('theme');
     $this->set('dialog', $dialog);
     $this->set('theme', $theme);
     $this->execute();
 }
示例#3
0
 /**
  * Constructor activating the default information of the class
  *
  * @access	public
  */
 function __construct()
 {
     // Call parent
     parent::__construct();
     $db = JFactory::getDBO();
     // get plugin name
     $plugin = JRequest::getCmd('plugin');
     // check plugin
     if ($this->checkPlugin($plugin)) {
         $this->set('_name', $plugin);
         $this->set('_type', JRequest::getWord('type', 'standard'));
         if (!defined('WF_EDITOR_PLUGIN')) {
             define('WF_EDITOR_PLUGIN', WF_EDITOR_PLUGINS . DS . $plugin);
         }
         // set variables for view
         $this->set('_layout', 'default');
         $this->set('_base_path', WF_EDITOR_PLUGIN);
         $this->set('_template_path', WF_EDITOR_PLUGIN . DS . 'tmpl');
     } else {
         die(JError::raiseError(403, 'RESTRICTED ACCESS'));
     }
 }
示例#4
0
 /**
  * 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) {
         if (is_dir(CKE_PLUGINS . DS . $plugin)) {
             $this->set('name', $plugin);
             $this->set('type', JRequest::getVar('type', 'standard'));
             /*	if (!defined('CKE_PLUGINS')) {
             				define('CKE_PLUGINS', CKE_PLUGINS . DS . $plugin);
             			}*/
             // set variables for view
             $this->set('layout', 'link');
             $this->set('base_path', dirname(__FILE__) . DS . '..' . DS . '..' . DS . 'tmpl' . DS . 'browser' . DS . 'tmpl');
             $this->set('template_path', CKE_PLUGINS . DS . 'linkBrowser' . DS . 'tmpl' . DS . 'linkBrowser' . DS . 'tmpl');
         }
     } else {
         die(JError::raiseError(403, JText::_('ERROR_403')));
     }
 }