/** This trigger function to help customize layout of some pages **/ public function onAfterInitialise() { $config = JFactory::getConfig(); $secret = $config->get('secret'); $offline = $config->get('offline'); $input = $this->_application->input; if ($this->_application->isSite() && $input->get->get('poweradmin', '0') == '1' && $input->get->get('jsnpa_key', '') == md5($secret) && $offline == '1') { $this->_online(); } if (!$this->_application->isAdmin()) { return; } if ($this->_application->isAdmin() && $this->_user->id > 0 && $input->getVar('tmpl', '') != 'component' && $this->_params->get('enable_adminbar', true) == true) { $this->_sendCookies(); $this->_target = JRequest::getBool('hidemainmenu') == true ? '_blank' : '_parent'; } if ($this->_user->id > 0) { PowerAdminHistoryHelper::onAfterInitialise(); } if ($input->getVar('format', '') == 'raw' || $input->getVar('format', '') == 'rss') { return; } $this->_helper = JSNPLGHelper::getInstance(); }
/** This trigger function to help customize layout of some pages **/ public function onAfterInitialise() { if (!$this->_application->isAdmin()) { return; } if ($this->_application->isAdmin() && $this->_user->id > 0 && JRequest::getVar('tmpl') != 'component' && $this->_params->get('enable_adminbar', true) == true) { $this->_sendCookies(); $this->_target = JRequest::getBool('hidemainmenu') == true ? '_blank' : '_parent'; } if ($this->_user->id > 0) { PowerAdminHistoryHelper::onAfterInitialise(); } if (JRequest::getVar('format', '') == 'raw' || JRequest::getVar('format', '') == 'rss') { return; } $this->_helper = JSNPLGHelper::getInstance(); }