コード例 #1
0
ファイル: Answers.php プロジェクト: yusufchang/app
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;
}
コード例 #2
0
ファイル: Answers.php プロジェクト: schwarer2006/wikia
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;
}