當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。