本文整理汇总了PHP中wfSpecialList函数的典型用法代码示例。如果您正苦于以下问题:PHP wfSpecialList函数的具体用法?PHP wfSpecialList怎么用?PHP wfSpecialList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wfSpecialList函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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";
}
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:37,代码来源:SpecialProtectedpages.php
示例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);
}
开发者ID:BackupTheBerlios,项目名称:blahtex,代码行数:7,代码来源:SpecialUnusedtemplates.php
示例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, '');
}
开发者ID:yusufchang,项目名称:app,代码行数:14,代码来源:WithoutimagesPage.class.php
示例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);
}
开发者ID:rocLv,项目名称:conference,代码行数:7,代码来源:SpecialUnusedtemplates.php
示例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);
}
开发者ID:negabaro,项目名称:alfresco,代码行数:8,代码来源:SpecialCategories.php
示例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));
}
开发者ID:GodelDesign,项目名称:Godel,代码行数:8,代码来源:SpecialAncientpages.php
示例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));
}
开发者ID:ruizrube,项目名称:spdef,代码行数:8,代码来源:SpecialWantedtemplates.php
示例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);
}
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:8,代码来源:SpecialPopularpages.php
示例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);
}
开发者ID:GodelDesign,项目名称:Godel,代码行数:8,代码来源:SpecialMostcategories.php
示例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);
}
开发者ID:negabaro,项目名称:alfresco,代码行数:15,代码来源:SpecialMostlinked.php
示例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);
}
开发者ID:Jobava,项目名称:diacritice-meta-repo,代码行数:9,代码来源:SpecialUnwatchedpages.php
示例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);
}
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:14,代码来源:SpecialMostlinkedcategories.php
示例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);
}
开发者ID:negabaro,项目名称:alfresco,代码行数:9,代码来源:SpecialWantedcategories.php
示例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);
}
开发者ID:puring0815,项目名称:OpenKore,代码行数:10,代码来源:SpecialMostcategories.php
示例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);
}
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:15,代码来源:SpecialUnwatchedpages.php
示例16: formatResult
function formatResult($skin, $result)
{
global $wgLang, $wgContLang;
$nt = Title::makeTitleSafe($result->namespace, $result->title);
$text = $wgContLang->convert($nt->getPrefixedText());
$plink = $skin->makeKnownLinkObj($nt, $text);
$nl = wfMsgExt('nrevisions', array('parsemag', 'escape'), $wgLang->formatNum($result->value));
$nlink = $skin->makeKnownLinkObj($nt, $nl, 'action=history');
return wfSpecialList($plink, $nlink);
}
开发者ID:Jobava,项目名称:diacritice-meta-repo,代码行数:10,代码来源:SpecialFewestrevisions.php
示例17: formatResult
function formatResult($skin, $result)
{
global $wgLang;
$title = Title::makeTitleSafe($result->namespace, $result->title);
if (!$title instanceof Title) {
throw new MWException('Invalid title in database');
}
$count = wfMsgExt('ncategories', array('parsemag', 'escape'), $wgLang->formatNum($result->value));
$link = $skin->makeKnownLinkObj($title, $title->getText());
return wfSpecialList($link, $count);
}
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:11,代码来源:SpecialMostcategories.php
示例18: formatResult
/**
* @param $skin Skin object
* @param $result Object: database row
*/
function formatResult($skin, $result)
{
global $wgLang, $wgContLang;
$nt = Title::makeTitleSafe($result->namespace, $result->title);
if (!$nt) {
return '<!-- bad title -->';
}
$text = $wgContLang->convert($nt->getPrefixedText());
$plink = $skin->linkKnown($nt, $text);
$nl = wfMsgExt('nrevisions', array('parsemag', 'escape'), $wgLang->formatNum($result->value));
$redirect = $result->redirect ? ' - ' . wfMsgHtml('isredirect') : '';
$nlink = $skin->linkKnown($nt, $nl, array(), array('action' => 'history')) . $redirect;
return wfSpecialList($plink, $nlink);
}
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:18,代码来源:SpecialFewestrevisions.php
示例19: formatResult
function formatResult($skin, $result)
{
if (empty($this->show)) {
$this->data[$result->title] = $result->value;
return false;
} else {
$title = Title::makeTitle(NS_CATEGORY, $result->title);
if ($title instanceof Title) {
$titleText = $skin->makeLinkObj($title, htmlspecialchars($title->getText()));
return wfSpecialList($titleText, $result->value);
} else {
return false;
}
}
}
开发者ID:Tjorriemorrie,项目名称:app,代码行数:15,代码来源:SpecialMostPopularCategories_body.php
示例20: formatResult
/**
* Format an individual result
*
* @param Skin $skin Skin to use for UI elements
* @param object $result Result row
* @return string
*/
public function formatResult($skin, $result)
{
$title = Title::makeTitleSafe($result->namespace, $result->title);
if ($title instanceof Title) {
if ($this->isCached()) {
$pageLink = $title->exists() ? '<s>' . $skin->makeLinkObj($title) . '</s>' : $skin->makeBrokenLinkObj($title);
} else {
$pageLink = $skin->makeBrokenLinkObj($title);
}
return wfSpecialList($pageLink, $this->makeWlhLink($title, $skin, $result));
} else {
$tsafe = htmlspecialchars($result->title);
return "Invalid title in result set; {$tsafe}";
}
}
开发者ID:Jobava,项目名称:diacritice-meta-repo,代码行数:22,代码来源:SpecialWantedpages.php
注:本文中的wfSpecialList函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论