public function onContentAfterDisplay($context, &$article, &$params, $limitstart = 0) { // Make sure that event gets only called once and only in J!1.6+ if (self::$inevent || self::$j15) { return; } self::$inevent = true; $result = $this->display($context, $article, $params); self::$inevent = false; return $result; }
/** * Before display content method. * * Method is called by the view and the results are imploded and displayed in a placeholder. * * @param string $context The context for the content passed to the plugin. * @param object $article The content object. Note $article->text is also available * @param object $params The content params * @param integer $limitstart The 'page' number * * @return string */ public function onContentBeforeDisplay($context, &$article, &$params, $limitstart = 0) { static $loaded = false; // Initialize plug-in during the first run. if (!$loaded) { $loaded = true; // Load language files and setup Kunena libraries. $this->loadLanguage(); KunenaForum::setup(); KunenaFactory::loadLanguage(); // Create Kunena Discuss table if it doesn't exist. $this->createTable(); } // Make sure that event gets only called once. if (self::$inevent) { return ''; } self::$inevent = true; $this->prepare($context, $article, $params); self::$inevent = false; return ''; }