当前位置: 首页>>代码示例>>PHP>>正文


PHP SkinTemplate类代码示例

本文整理汇总了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));
     }
 }
开发者ID:kolzchut,项目名称:mediawiki-extensions-MarkMajorChanges,代码行数:9,代码来源:MarkMajorChanges.hooks.php

示例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;
}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:15,代码来源:Todo.php

示例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;
 }
开发者ID:nathancarter,项目名称:ArticleProtection,代码行数:10,代码来源:ArticleProtection.hooks.php

示例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;
 }
开发者ID:MediaWiki-stable,项目名称:1.26.1,代码行数:17,代码来源:CiteThisPage.hooks.php

示例5: initPage

 /** Using Bootstrap */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'bootstrap';
     $this->stylename = 'bootstrap';
     $this->template = 'BootstrapTemplate';
 }
开发者ID:nzhenev,项目名称:Bootstrap-Skin,代码行数:8,代码来源:Bootstrap.php

示例6: initPage

 /** Using RoundedBlue. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'RoundedBlue';
     $this->stylename = 'RoundedBlue';
     $this->template = 'RoundedBlueTemplate';
 }
开发者ID:hnJaermuseet,项目名称:JM-booking,代码行数:8,代码来源:RoundedBlue.php

示例7: initPage

 /** Using monobook. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'wolfbane';
     $this->stylename = 'wolfbane';
     $this->template = 'wolfbane';
 }
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:8,代码来源:wolfbane.php

示例8: initPage

 /** Using monoproject. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'Mono2';
     $this->stylename = 'Mono2';
     $this->template = 'Mono2Template';
 }
开发者ID:akoeplinger,项目名称:release,代码行数:8,代码来源:Mono2.php

示例9: initPage

 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'agp';
     $this->stylename = 'agp';
     $this->template = 'AGPTemplate';
 }
开发者ID:saper,项目名称:organic-extensions,代码行数:7,代码来源:AGP.php

示例10: initPage

 /** Using GuMax */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'gumax';
     $this->stylename = 'gumax';
     $this->template = 'GuMaxTemplate';
 }
开发者ID:Jobava,项目名称:diacritice-meta-repo,代码行数:8,代码来源:GuMax.php

示例11: initPage

 /** Using gforge. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'gforge';
     $this->stylename = 'gforge';
     $this->template = 'GForgeTemplate';
 }
开发者ID:neymanna,项目名称:fusionforge,代码行数:8,代码来源:GForge.php

示例12: initPage

 function initPage(OutputPage $out)
 {
     parent::initPage($out);
     $this->skinname = 'modern';
     $this->stylename = 'modern';
     $this->template = 'ModernTemplate';
 }
开发者ID:amjadtbssm,项目名称:website,代码行数:7,代码来源:Modern.php

示例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');
 }
开发者ID:AmeBel,项目名称:opencog.org,代码行数:7,代码来源:CavendishMW.php

示例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);
 }
开发者ID:MediaWiki-stable,项目名称:1.26.1,代码行数:11,代码来源:SkinVector.php

示例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);
 }
开发者ID:Azany,项目名称:mediawiki-bootstrap,代码行数:11,代码来源:MediaWikiBootstrap.skin.php


注:本文中的SkinTemplate类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。