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
0
/**
 * 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;
}
 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;
 }
 /**
  * @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
0
 function initPage(OutputPage $out)
 {
     parent::initPage($out);
     $this->skinname = 'modern';
     $this->stylename = 'modern';
     $this->template = 'ModernTemplate';
 }
예제 #6
0
 /** Using Bootstrap */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'bootstrap';
     $this->stylename = 'bootstrap';
     $this->template = 'BootstrapTemplate';
 }
예제 #7
0
 /** Using RoundedBlue. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'RoundedBlue';
     $this->stylename = 'RoundedBlue';
     $this->template = 'RoundedBlueTemplate';
 }
예제 #8
0
 /** Using monobook. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'wolfbane';
     $this->stylename = 'wolfbane';
     $this->template = 'wolfbane';
 }
예제 #9
0
 function setupSkinUserCss(OutputPage $out)
 {
     global $wgHandheldStyle;
     parent::setupSkinUserCss($out);
     // Append to the default screen common & print styles...
     $out->addStyle('cavendishmw/main.css', 'screen');
 }
예제 #10
0
 /** Using monoproject. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'Mono2';
     $this->stylename = 'Mono2';
     $this->template = 'Mono2Template';
 }
예제 #11
0
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'agp';
     $this->stylename = 'agp';
     $this->template = 'AGPTemplate';
 }
예제 #12
0
 /**
  * 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);
 }
 /**
  * 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);
 }
예제 #14
0
 /** Using monobook. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'mamut';
     $this->stylename = 'mamut';
     $this->template = 'MamutTemplate';
 }
예제 #15
0
 function setupSkinUserCss(OutputPage $out)
 {
     global $wgLocalStylePath;
     parent::setupSkinUserCss($out);
     $out->addStyle('scratchwikiskin/main.css', 'screen');
     $out->addHeadItem('skinscript', "<script type='text/javascript' src='{$wgLocalStylePath}/scratchwikiskin/skin.js'></script>");
 }
예제 #16
0
 /** Using GuMax */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'gumax';
     $this->stylename = 'gumax';
     $this->template = 'GuMaxTemplate';
 }
예제 #17
0
 function setupSkinUserCss(OutputPage $out)
 {
     parent::setupSkinUserCss($out);
     $out->addHeadItem('font-awesome', '<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css" />');
     $out->addHeadItem('google-ads', '<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>');
     $out->addModuleStyles(array('skins.liberty.styles'));
 }
예제 #18
0
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'openkore';
     $this->stylename = 'openkore';
     $this->template = 'OpenKoreTemplate';
 }
예제 #19
0
 /** Using monobook. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'fedora';
     $this->stylename = 'fedora';
     $this->template = 'FedoraTemplate';
 }
예제 #20
0
 function setupSkinUserCss(OutputPage $out)
 {
     global $wgHandheldStyle, $wgStyleVersion, $wgJsMimeType, $wgStylePath;
     parent::setupSkinUserCss($out);
     // Append to the default screen common & print styles...
     $out->addStyle('ewg/main.css', 'screen');
 }
예제 #21
0
 /** Using gforge. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'gforge';
     $this->stylename = 'gforge';
     $this->template = 'GForgeTemplate';
 }
예제 #22
0
파일: Chick.php 프로젝트: Tjorriemorrie/app
 /**
  * @param $out OutputPage
  */
 function setupSkinUserCss(OutputPage $out)
 {
     parent::setupSkinUserCss($out);
     $out->addModuleStyles('skins.chick');
     // TODO: Migrate all of these to RL
     $out->addStyle('chick/IE60Fixes.css', 'screen,handheld', 'IE 6');
 }
예제 #23
0
	/**
	 * Loads skin and user CSS files.
	 * @param $out OutputPage object
	 */
	function setupSkinUserCss( OutputPage $out ) {
		parent::setupSkinUserCss( $out );

		$styles = array( 'skins.vector' );
		wfRunHooks( 'SkinVectorStyleModules', array( &$this, &$styles ) );
		$out->addModuleStyles( $styles );
	}
예제 #24
0
 /**
  * Loads skin and user CSS files.
  * @param OutputPage $out
  */
 function setupSkinUserCss(OutputPage $out)
 {
     parent::setupSkinUserCss($out);
     $styles = array('skins.libre.styles');
     wfRunHooks('SkinLibreStyleModules', array($this, &$styles));
     $out->addModuleStyles($styles);
 }
예제 #25
0
 /** Using monobook. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'gamegardens';
     $this->stylename = 'gamegardens';
     $this->template = 'GameGardensTemplate';
 }
 /** Using cavendish. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'cavendish';
     $this->stylename = 'cavendish';
     $this->template = 'cavendishTemplate';
 }
예제 #27
0
 function initPage(OutputPage $out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'simple';
     $this->stylename = 'simple';
     $this->template = 'MonoBookTemplate';
 }
예제 #28
0
	/**
	 * @author Inez Korczynski <*****@*****.**>
	 */
	public function initPage(&$out) {

		wfDebugLog('lyricsminimal', '##### SkinLyricsMinimal initPage #####');

		wfProfileIn(__METHOD__);
		global $wgHooks, $wgCityId, $wgCat;

		SkinTemplate::initPage($out);

		$this->skinname  = 'lyricsminimal';
		$this->stylename = 'lyricsminimal';
		$this->template  = 'LyricsMinimalTemplate';

		// Get category information (id, name, url)
		$cats = wfGetBreadCrumb();
		$idx = count($cats)-2;
		if(isset($cats[$idx])) {
			$wgCat = $cats[$idx];
			wfDebugLog('lyricsminimal', 'There is category info');
		} else {
			$wgCat = array('id' => -1);
			wfDebugLog('lyricsminimal', 'No category info');
		}

		// Function addVariables will be called to populate all needed data to render skin
		$wgHooks['SkinTemplateOutputPageBeforeExec'][] = array(&$this, 'addVariables');

		wfProfileOut(__METHOD__);
	}
예제 #29
0
 /** Using monobook. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'monobook';
     $this->stylename = 'monobook';
     $this->template = 'MonoBookTemplate';
 }
예제 #30
0
 function setupSkinUserCss(OutputPage $out)
 {
     parent::setupSkinUserCss($out);
     // Add CSS & JS
     $out->addModuleStyles(array('skins.nimbus', 'skins.monobook'));
     $out->addModuleScripts('skins.nimbus');
 }