function wfCategoryPageWithAds(&$cat) { global $wgOut; global $wgUser; $article = new Article($cat->mTitle); $article->view(); if (NS_CATEGORY == $cat->mTitle->getNamespace()) { global $wgOut, $wgRequest; $from = $wgRequest->getVal('from'); $until = $wgRequest->getVal('until'); $viewer = new CategoryWithAds($cat->mTitle, $from, $until); $wgOut->addHTML($viewer->getHTML()); } return false; }
function wfCategoryPageWithAds(&$cat) { global $wgOut; global $wgUser; if ($wgUser->isAnon()) { $wgOut->addHTML(AdEngine::getInstance()->getPlaceHolderDiv('ANSWERSCAT_LEADERBOARD_A')); } $article = new Article($cat->mTitle); $article->view(); if (NS_CATEGORY == $cat->mTitle->getNamespace()) { global $wgOut, $wgRequest; $from = $wgRequest->getVal('from'); $until = $wgRequest->getVal('until'); $viewer = new CategoryWithAds($cat->mTitle, $from, $until); $wgOut->addHTML($viewer->getHTML()); } return false; }