ext = 'feed'; $items = Document::get()->items; $params = null; foreach ($items as $item) { $this->handleOnContentPrepare('article', $context, $item, $params); } } /** * @return void */ protected function handleOnAfterDispatch() { $this->handleFeedArticles(); } /** * @return void */ protected function handleOnAfterInitialise() { } /** * @return void * * Consider using changeFinalHtmlOutput instead */ protected function handleOnAfterRender() { } /** * @param string $buffer * @param string $params * * @return void */ protected function handleOnAfterRenderModules(&$buffer, &$params) { } /** * @return void */ protected function handleOnAfterRoute() { } /** * @return void */ protected function handleOnBeforeCompileHead() { } /** * @param string $area * @param string $context The context of the content being passed to the plugin. * @param mixed $article An object with a "text" property * @param mixed &$params Additional parameters. See {@see PlgContentContent()}. * @param int $page Optional page number. Unused. Defaults to zero. * * @return bool */ protected function handleOnContentPrepare($area, $context, &$article, &$params, $page = 0) { return true; } /** * @param JForm $form The form * @param stdClass $data The data * * @return bool */ protected function handleOnContentPrepareForm(JForm $form, $data) { return true; } protected function init() { return; } /** * @param string $buffer * * @return void */ protected function loadStylesAndScripts(&$buffer) { } /** * @return bool */ protected function passChecks() { if ( ! is_null($this->_pass)) { return $this->_pass; } $this->setPass(false); if ( ! $this->isFrameworkEnabled()) { return false; } if ($this->_doc_ready && ! $this->passPageTypes()) { return false; } // allow in frontend? if ( ! $this->_enable_in_frontend && ! $this->_is_admin ) { return false; } $params = Parameters::getPlugin($this->_name); // allow in admin? if ( ! $this->_enable_in_admin && $this->_is_admin && ( ! isset($params->enable_admin) || ! $params->enable_admin) ) { return false; } // disabled by url? if ( $this->_can_disable_by_url && Protect::isDisabledByUrl($this->_alias) ) { return false; } // disabled by component? if ( $this->_disable_on_components && Protect::isRestrictedComponent($params->disabled_components ?? [], 'component') ) { return false; } // restricted page? if (Protect::isRestrictedPage($this->_has_tags, $this->_protected_formats)) { return false; } if ( ! $this->extraChecks()) { return false; } $this->setPass(true); return true; } protected function passPageTypes() { if (empty($this->_page_types)) { return true; } if (in_array('*', $this->_page_types)) { return true; } if (empty(JFactory::$document)) { return true; } if (Document::isFeed()) { return in_array('feed', $this->_page_types); } if (Document::isPDF()) { return in_array('pdf', $this->_page_types); } $page_type = Document::get()->getType(); if (in_array($page_type, $this->_page_types)) { return true; } return false; } /** * Place an error in the message queue */ protected function throwError($error) { $user = JFactory::getApplication()->getIdentity() ?: JFactory::getUser(); // Return if page is not an admin page or the admin login page if ( ! JFactory::getApplication()->isClient('administrator') || $user->get('guest') ) { return; } // load the admin language file JFactory::getLanguage()->load('plg_' . $this->_type . '_' . $this->_name, JPATH_PLUGINS . '/' . $this->_type . '/' . $this->_name); $text = JText::sprintf($this->_lang_prefix . '_' . $error, JText::_($this->_title)); $text = JText::_($text) . ' ' . JText::sprintf($this->_lang_prefix . '_EXTENSION_CAN_NOT_FUNCTION', JText::_($this->_title)); // Check if message is not already in queue $messagequeue = JFactory::getApplication()->getMessageQueue(); foreach ($messagequeue as $message) { if ($message['message'] == $text) { return; } } JFactory::getApplication()->enqueueMessage($text, 'error'); } /** * Check if the Regular Labs Library is enabled * * @return bool */ private function isFrameworkEnabled() { if ( ! defined('REGULAR_LABS_LIBRARY_ENABLED')) { $this->setIsFrameworkEnabled(); } if ( ! REGULAR_LABS_LIBRARY_ENABLED) { $this->throwError('REGULAR_LABS_LIBRARY_NOT_ENABLED'); } return REGULAR_LABS_LIBRARY_ENABLED; } /** * Set the define with whether the Regular Labs Library is enabled */ private function setIsFrameworkEnabled() { if ( ! JPluginHelper::isEnabled('system', 'regularlabs')) { $this->throwError('REGULAR_LABS_LIBRARY_NOT_ENABLED'); define('REGULAR_LABS_LIBRARY_ENABLED', false); return; } define('REGULAR_LABS_LIBRARY_ENABLED', true); } /** * @param bool $pass * * @return void */ private function setPass($pass) { if ( ! $this->_doc_ready) { return; } $this->_pass = (bool) $pass; } } 500 Internal Server Error
Failed to load 'rt_gemini' template: Please install Gantry 5 Framework!