當前位置: 首頁>>代碼示例>>PHP>>正文


PHP SpecialPage::getRegularPages方法代碼示例

本文整理匯總了PHP中SpecialPage::getRegularPages方法的典型用法代碼示例。如果您正苦於以下問題:PHP SpecialPage::getRegularPages方法的具體用法?PHP SpecialPage::getRegularPages怎麽用?PHP SpecialPage::getRegularPages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SpecialPage的用法示例。


在下文中一共展示了SpecialPage::getRegularPages方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: wfSpecialSpecialpages

/**
 *
 */
function wfSpecialSpecialpages()
{
    global $wgOut, $wgUser;
    $wgOut->setRobotpolicy('index,nofollow');
    $sk = $wgUser->getSkin();
    /** Pages available to all */
    wfSpecialSpecialpages_gen(SpecialPage::getRegularPages(), 'spheading', $sk);
    /** Restricted special pages */
    wfSpecialSpecialpages_gen(SpecialPage::getRestrictedPages(), 'restrictedpheading', $sk);
}
開發者ID:negabaro,項目名稱:alfresco,代碼行數:13,代碼來源:SpecialSpecialpages.php

示例2: wfSpecialSpecialpages

/**
 *
 */
function wfSpecialSpecialpages()
{
    global $wgOut, $wgUser, $wgMessageCache;
    $wgMessageCache->loadAllMessages();
    $wgOut->setRobotpolicy('noindex,nofollow');
    # Is this really needed?
    $sk = $wgUser->getSkin();
    /** Pages available to all */
    wfSpecialSpecialpages_gen(SpecialPage::getRegularPages(), 'spheading', $sk);
    /** Restricted special pages */
    wfSpecialSpecialpages_gen(SpecialPage::getRestrictedPages(), 'restrictedpheading', $sk);
}
開發者ID:BackupTheBerlios,項目名稱:shoutwiki-svn,代碼行數:15,代碼來源:SpecialSpecialpages.php

示例3: specialPagesList

 /**
  * show a drop-down box of special pages
  */
 function specialPagesList()
 {
     global $wgUser, $wgContLang, $wgServer, $wgRedirectScript;
     $pages = array_merge(SpecialPage::getRegularPages(), SpecialPage::getRestrictedPages());
     foreach ($pages as $name => $page) {
         $pages[$name] = $page->getDescription();
     }
     $go = wfMsg('go');
     $sp = wfMsg('specialpages');
     $spp = $wgContLang->specialPage('Specialpages');
     $s = '<form id="specialpages" method="get" ' . 'action="' . htmlspecialchars("{$wgServer}{$wgRedirectScript}") . "\">\n";
     $s .= "<select name=\"wpDropdown\">\n";
     $s .= "<option value=\"{$spp}\">{$sp}</option>\n";
     foreach ($pages as $name => $desc) {
         $p = $wgContLang->specialPage($name);
         $s .= "<option value=\"{$p}\">{$desc}</option>\n";
     }
     $s .= "</select>\n";
     $s .= "<input type='submit' value=\"{$go}\" name='redirect' />\n";
     $s .= "</form>\n";
     return $s;
 }
開發者ID:ruizrube,項目名稱:spdef,代碼行數:25,代碼來源:Skin.php


注:本文中的SpecialPage::getRegularPages方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。