예제 #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
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;
}