本文整理汇总了PHP中wfSpecialList函数的典型用法代码示例。如果您正苦于以下问题:PHP wfSpecialList函数的具体用法?PHP wfSpecialList怎么用?PHP wfSpecialList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wfSpecialList函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: formatRow
/**
* Callback function to output a restriction
*/
function formatRow($row)
{
global $wgUser, $wgLang, $wgContLang;
wfProfileIn(__METHOD__);
static $skin = null;
if (is_null($skin)) {
$skin = $wgUser->getSkin();
}
$title = Title::makeTitleSafe($row->page_namespace, $row->page_title);
$link = $skin->makeLinkObj($title);
$description_items = array();
$protType = wfMsgHtml('restriction-level-' . $row->pr_level);
$description_items[] = $protType;
if ($row->pr_cascade) {
$description_items[] = wfMsg('protect-summary-cascade');
}
$expiry_description = '';
$stxt = '';
if ($row->pr_expiry != 'infinity' && strlen($row->pr_expiry)) {
$expiry = Block::decodeExpiry($row->pr_expiry);
$expiry_description = wfMsgForContent('protect-expiring', $wgLang->timeanddate($expiry));
$description_items[] = $expiry_description;
}
if (!is_null($size = $row->page_len)) {
if ($size == 0) {
$stxt = ' <small>' . wfMsgHtml('historyempty') . '</small>';
} else {
$stxt = ' <small>' . wfMsgHtml('historysize', $wgLang->formatNum($size)) . '</small>';
}
$stxt = $wgContLang->getDirMark() . $stxt;
}
wfProfileOut(__METHOD__);
return '<li>' . wfSpecialList($link . $stxt, implode($description_items, ', ')) . "</li>\n";
}
示例2: formatResult
function formatResult($skin, $result)
{
$title = Title::makeTitle(NS_TEMPLATE, $result->title);
$pageLink = $skin->makeKnownLinkObj($title, '', 'redirect=no');
$wlhLink = $skin->makeKnownLinkObj(Title::makeTitle(NS_SPECIAL, 'Whatlinkshere'), wfMsgHtml('unusedtemplateswlh'), 'target=' . $title->getPrefixedUrl());
return wfSpecialList($pageLink, $wlhLink);
}
示例3: formatResult
/**
* Make links to the page corresponding to the item
*
* @param $skin Skin to be used
* @param $result Result row
* @return string
*/
function formatResult($skin, $result)
{
global $wgLang;
$title = Title::makeTitleSafe($result->namespace, $result->title);
$link = $skin->makeLinkObj($title);
return wfSpecialList($link, '');
}
示例4: formatResult
function formatResult($skin, $result)
{
$title = Title::makeTitle(NS_TEMPLATE, $result->title);
$pageLink = $skin->linkKnown($title, null, array(), array('redirect' => 'no'));
$wlhLink = $skin->linkKnown(SpecialPage::getTitleFor('Whatlinkshere'), wfMsgHtml('unusedtemplateswlh'), array(), array('target' => $title->getPrefixedText()));
return wfSpecialList($pageLink, $wlhLink);
}
示例5: formatResult
function formatResult($skin, $result)
{
global $wgLang;
$title = Title::makeTitle(NS_CATEGORY, $result->title);
$plink = $skin->makeLinkObj($title, $title->getText());
$nlinks = wfMsgExt('nmembers', array('parsemag', 'escape'), $wgLang->formatNum($result->count));
return wfSpecialList($plink, $nlinks);
}
示例6: formatResult
function formatResult($skin, $result)
{
global $wgLang, $wgContLang;
$d = $wgLang->timeanddate(wfTimestamp(TS_MW, $result->value), true);
$title = Title::makeTitle($result->namespace, $result->title);
$link = $skin->linkKnown($title, htmlspecialchars($wgContLang->convert($title->getPrefixedText())));
return wfSpecialList($link, htmlspecialchars($d));
}
示例7: formatResult
function formatResult($skin, $result)
{
global $wgLang, $wgContLang;
$nt = Title::makeTitle($result->namespace, $result->title);
$text = $wgContLang->convert($nt->getText());
$plink = $this->isCached() ? $skin->makeLinkObj($nt, htmlspecialchars($text)) : $skin->makeBrokenLinkObj($nt, htmlspecialchars($text));
return wfSpecialList($plink, $this->makeWlhLink($nt, $skin, $result));
}
示例8: formatResult
function formatResult($skin, $result)
{
global $wgLang, $wgContLang;
$title = Title::makeTitle($result->namespace, $result->title);
$link = $skin->makeKnownLinkObj($title, htmlspecialchars($wgContLang->convert($title->getPrefixedText())));
$nv = wfMsgExt('nviews', array('parsemag', 'escape'), $wgLang->formatNum($result->value));
return wfSpecialList($link, $nv);
}
示例9: formatResult
function formatResult($skin, $result)
{
global $wgLang;
$title = Title::makeTitleSafe($result->namespace, $result->title);
$count = wfMsgExt('ncategories', array('parsemag', 'escape'), $wgLang->formatNum($result->value));
$link = $skin->link($title);
return wfSpecialList($link, $count);
}
示例10: formatResult
/**
* Make links to the page corresponding to the item, and the "what links here" page for it
*
* @param $skin Skin to be used
* @param $result Result row
* @return string
*/
function formatResult($skin, $result)
{
global $wgLang;
$title = Title::makeTitleSafe($result->namespace, $result->title);
$link = $skin->makeLinkObj($title);
$wlh = $this->makeWlhLink($title, wfMsgExt('nlinks', array('parsemag', 'escape'), $wgLang->formatNum($result->value)), $skin);
return wfSpecialList($link, $wlh);
}
示例11: formatResult
function formatResult($skin, $result)
{
global $wgContLang;
$nt = Title::makeTitle($result->namespace, $result->title);
$text = $wgContLang->convert($nt->getPrefixedText());
$plink = $skin->makeKnownLinkObj($nt, htmlspecialchars($text));
$wlink = $skin->makeKnownLinkObj($nt, wfMsgHtml('watch'), 'action=watch');
return wfSpecialList($plink, $wlink);
}
示例12: formatResult
/**
* @param $skin Skin
* @param $result
* @return string
*/
function formatResult($skin, $result)
{
global $wgLang, $wgContLang;
$nt = Title::makeTitle(NS_CATEGORY, $result->title);
$text = $wgContLang->convert($nt->getText());
$plink = $skin->link($nt, htmlspecialchars($text));
$nlinks = wfMsgExt('nmembers', array('parsemag', 'escape'), $wgLang->formatNum($result->value));
return wfSpecialList($plink, $nlinks);
}
示例13: formatResult
function formatResult($skin, $result)
{
global $wgLang, $wgContLang;
$nt = Title::makeTitle($result->namespace, $result->title);
$text = $wgContLang->convert($nt->getText());
$plink = $this->isCached() ? $skin->makeLinkObj($nt, htmlspecialchars($text)) : $skin->makeBrokenLinkObj($nt, htmlspecialchars($text));
$nlinks = wfMsgExt('nmembers', array('parsemag', 'escape'), $wgLang->formatNum($result->value));
return wfSpecialList($plink, $nlinks);
}
示例14: formatResult
function formatResult($skin, $result)
{
global $wgContLang, $wgLang;
$nt = Title::makeTitle($result->namespace, $result->title);
$text = $wgContLang->convert($nt->getPrefixedText());
$plink = $skin->makeKnownLink($nt->getPrefixedText(), $text);
$nl = wfMsgExt('ncategories', array('parsemag', 'escape'), $wgLang->formatNum($result->value));
$nlink = $skin->makeKnownLink($wgContLang->specialPage('Categories'), $nl, 'article=' . $nt->getPrefixedURL());
return wfSpecialList($plink, $nlink);
}
示例15: formatResult
/**
* @param $skin Skin
* @param $result
* @return string
*/
function formatResult($skin, $result)
{
global $wgContLang;
$nt = Title::makeTitle($result->namespace, $result->title);
$text = $wgContLang->convert($nt->getPrefixedText());
$plink = Linker::linkKnown($nt, htmlspecialchars($text));
$token = WatchAction::getWatchToken($nt, $this->getUser());
$wlink = Linker::linkKnown($nt, wfMsgHtml('watch'), array(), array('action' => 'watch', 'token' => $token));
return wfSpecialList($plink, $wlink);
}