本文整理汇总了PHP中SpecialPage::getRestrictedPages方法的典型用法代码示例。如果您正苦于以下问题:PHP SpecialPage::getRestrictedPages方法的具体用法?PHP SpecialPage::getRestrictedPages怎么用?PHP SpecialPage::getRestrictedPages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpecialPage
的用法示例。
在下文中一共展示了SpecialPage::getRestrictedPages方法的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);
}
示例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);
}
示例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;
}