get_template_vars('currentContext'); $pluginSettingsDao = DAORegistry::getDAO('PluginSettingsDAO'); $contextDisplaySettingExists = $pluginSettingsDao->settingExists($context->getId(), $this->getName(), 'displayStatistics'); $contextDisplaySetting = $this->getSetting($context->getId(), 'displayStatistics'); $siteDisplaySetting = $this->getSetting(CONTEXT_ID_NONE, 'displayStatistics'); if (($contextDisplaySettingExists && $contextDisplaySetting) || (!$contextDisplaySettingExists && $siteDisplaySetting)) { $pubObject =& $smarty->get_template_vars('article'); assert(is_a($pubObject, 'PublishedArticle')); $pubObjectId = $pubObject->getID(); $pubObjectType = 'PublishedArticle'; $output .= $this->getTemplate( array( 'pubObjectType' => $pubObjectType, 'pubObjectId' => $pubObjectId, ), 'outputFrontend.tpl', $smarty ); $this->addJavascriptData($this->getAllDownloadsStats($pubObjectId), $pubObjectType, $pubObjectId, 'frontend-article-view'); $this->loadJavascript('frontend-article-view' ); } return false; } } ?>