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));
     }
 }
Example #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;
 }
Example #5
0
 function initPage(OutputPage $out)
 {
     parent::initPage($out);
     $this->skinname = 'modern';
     $this->stylename = 'modern';
     $this->template = 'ModernTemplate';
 }
Example #6
0
 /** Using Bootstrap */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'bootstrap';
     $this->stylename = 'bootstrap';
     $this->template = 'BootstrapTemplate';
 }
Example #7
0
 /** Using RoundedBlue. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'RoundedBlue';
     $this->stylename = 'RoundedBlue';
     $this->template = 'RoundedBlueTemplate';
 }
 /** Using monobook. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'wolfbane';
     $this->stylename = 'wolfbane';
     $this->template = 'wolfbane';
 }
Example #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');
 }
Example #10
0
 /** Using monoproject. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'Mono2';
     $this->stylename = 'Mono2';
     $this->template = 'Mono2Template';
 }
Example #11
0
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'agp';
     $this->stylename = 'agp';
     $this->template = 'AGPTemplate';
 }
Example #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);
 }
Example #14
0
 /** Using monobook. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'mamut';
     $this->stylename = 'mamut';
     $this->template = 'MamutTemplate';
 }
 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>");
 }
Example #16
0
 /** Using GuMax */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'gumax';
     $this->stylename = 'gumax';
     $this->template = 'GuMaxTemplate';
 }
Example #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'));
 }
Example #18
0
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'openkore';
     $this->stylename = 'openkore';
     $this->template = 'OpenKoreTemplate';
 }
Example #19
0
 /** Using monobook. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'fedora';
     $this->stylename = 'fedora';
     $this->template = 'FedoraTemplate';
 }
Example #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');
 }
Example #21
0
 /** Using gforge. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'gforge';
     $this->stylename = 'gforge';
     $this->template = 'GForgeTemplate';
 }
Example #22
0
 /**
  * @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');
 }
Example #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 );
	}
Example #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);
 }
Example #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';
 }
Example #27
0
 function initPage(OutputPage $out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'simple';
     $this->stylename = 'simple';
     $this->template = 'MonoBookTemplate';
 }
Example #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__);
	}
 /** Using monobook. */
 function initPage(&$out)
 {
     SkinTemplate::initPage($out);
     $this->skinname = 'monobook';
     $this->stylename = 'monobook';
     $this->template = 'MonoBookTemplate';
 }
Example #30
0
 function setupSkinUserCss(OutputPage $out)
 {
     parent::setupSkinUserCss($out);
     // Add CSS & JS
     $out->addModuleStyles(array('skins.nimbus', 'skins.monobook'));
     $out->addModuleScripts('skins.nimbus');
 }