本文整理汇总了PHP中SkinTemplate类的典型用法代码示例。如果您正苦于以下问题:PHP SkinTemplate类的具体用法?PHP SkinTemplate怎么用?PHP SkinTemplate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SkinTemplate类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addMarkButton
public static function addMarkButton(SkinTemplate &$sktemplate, array &$links)
{
$title = $sktemplate->getRelevantTitle();
$user = $sktemplate->getUser();
if ($user->isAllowedAll('changetags', 'markmajorchange')) {
$urlParams = array('action' => 'markmajorchange');
$links['actions']['markmajorchange'] = array('text' => $sktemplate->msg('markmajorchanges-mark-btn')->text(), 'href' => $title->getLocalURL($urlParams));
}
}
示例2: todoAddTab
/**
* Add a 'todo' tab on user pages
* @param SkinTemplate $skin
* @param array $actions
* @return bool true to continue running hooks, false to abort operation
*/
function todoAddTab( $skin, &$actions ) {
if ( $skin->getTitle()->getNamespace() == NS_USER || $skin->getTitle()->getNamespace() == NS_USER_TALK ) {
$title = SpecialPage::getTitleFor( 'Todo', $skin->getTitle()->getText() );
$actions['todo'] = array(
'text' => wfMsg( 'todo-tab' ),
'href' => $title->getLocalUrl() );
}
return true;
}
示例3: onSkinTemplateNavigation
public static function onSkinTemplateNavigation(SkinTemplate &$sktemplate, array &$links)
{
global $wgTitle, $articleProtectionNS, $wgOut;
if (!in_array($wgTitle->getNamespace(), $articleProtectionNS)) {
return true;
}
$article_details = $sktemplate->makeArticleUrlDetails(Title::newFromText('Special:ArticleProtection/' . $wgTitle->getFullText())->getFullText());
$links['views']['protection'] = array('class' => false, 'text' => "View editors", 'href' => $article_details['href']);
return true;
}
示例4: onSkinTemplateBuildNavUrlsNav_urlsAfterPermalink
/**
* @param SkinTemplate $skintemplate
* @param $nav_urls
* @param $oldid
* @param $revid
* @return bool
*/
public static function onSkinTemplateBuildNavUrlsNav_urlsAfterPermalink(&$skintemplate, &$nav_urls, &$oldid, &$revid)
{
// check whether we’re in the right namespace, the $revid has the correct type and is not empty
// (which would mean that the current page doesn’t exist)
$title = $skintemplate->getTitle();
if ($title->isContentPage() && $revid !== 0 && !empty($revid)) {
$nav_urls['citeThisPage'] = array('args' => array('page' => $title->getPrefixedDBkey(), 'id' => $revid));
}
return true;
}
示例5: initPage
/** Using Bootstrap */
function initPage(&$out)
{
SkinTemplate::initPage($out);
$this->skinname = 'bootstrap';
$this->stylename = 'bootstrap';
$this->template = 'BootstrapTemplate';
}
示例6: initPage
/** Using RoundedBlue. */
function initPage(&$out)
{
SkinTemplate::initPage($out);
$this->skinname = 'RoundedBlue';
$this->stylename = 'RoundedBlue';
$this->template = 'RoundedBlueTemplate';
}
示例7: initPage
/** Using monobook. */
function initPage(&$out)
{
SkinTemplate::initPage($out);
$this->skinname = 'wolfbane';
$this->stylename = 'wolfbane';
$this->template = 'wolfbane';
}
示例8: initPage
/** Using monoproject. */
function initPage(&$out)
{
SkinTemplate::initPage($out);
$this->skinname = 'Mono2';
$this->stylename = 'Mono2';
$this->template = 'Mono2Template';
}
示例9: initPage
function initPage(&$out)
{
SkinTemplate::initPage($out);
$this->skinname = 'agp';
$this->stylename = 'agp';
$this->template = 'AGPTemplate';
}
示例10: initPage
/** Using GuMax */
function initPage(&$out)
{
SkinTemplate::initPage($out);
$this->skinname = 'gumax';
$this->stylename = 'gumax';
$this->template = 'GuMaxTemplate';
}
示例11: initPage
/** Using gforge. */
function initPage(&$out)
{
SkinTemplate::initPage($out);
$this->skinname = 'gforge';
$this->stylename = 'gforge';
$this->template = 'GForgeTemplate';
}
示例12: initPage
function initPage(OutputPage $out)
{
parent::initPage($out);
$this->skinname = 'modern';
$this->stylename = 'modern';
$this->template = 'ModernTemplate';
}
示例13: setupSkinUserCss
function setupSkinUserCss(OutputPage $out)
{
global $wgHandheldStyle;
parent::setupSkinUserCss($out);
// Append to the default screen common & print styles...
$out->addStyle('cavendishmw/main.css', 'screen');
}
示例14: setupSkinUserCss
/**
* Loads skin and user CSS files.
* @param OutputPage $out
*/
function setupSkinUserCss(OutputPage $out)
{
parent::setupSkinUserCss($out);
$styles = array('mediawiki.skinning.interface', 'skins.vector.styles');
Hooks::run('SkinVectorStyleModules', array($this, &$styles));
$out->addModuleStyles($styles);
}
示例15: setupSkinUserCss
/**
* Loads skin and user CSS files.
* @param OutputPage $out
*/
function setupSkinUserCss(OutputPage $out)
{
parent::setupSkinUserCss($out);
$styles = array('mediawiki.skinning.interface', 'skins.mediawikibootstrap');
wfRunHooks('SkinMediawikibootstrapStyleModules', array($this, &$styles));
$out->addModuleStyles($styles);
}