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)); } }
/** * 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; }
function initPage(OutputPage $out) { parent::initPage($out); $this->skinname = 'modern'; $this->stylename = 'modern'; $this->template = 'ModernTemplate'; }
/** Using Bootstrap */ function initPage(&$out) { SkinTemplate::initPage($out); $this->skinname = 'bootstrap'; $this->stylename = 'bootstrap'; $this->template = 'BootstrapTemplate'; }
/** 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'; }
function setupSkinUserCss(OutputPage $out) { global $wgHandheldStyle; parent::setupSkinUserCss($out); // Append to the default screen common & print styles... $out->addStyle('cavendishmw/main.css', 'screen'); }
/** Using monoproject. */ function initPage(&$out) { SkinTemplate::initPage($out); $this->skinname = 'Mono2'; $this->stylename = 'Mono2'; $this->template = 'Mono2Template'; }
function initPage(&$out) { SkinTemplate::initPage($out); $this->skinname = 'agp'; $this->stylename = 'agp'; $this->template = 'AGPTemplate'; }
/** * 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); }
/** 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>"); }
/** Using GuMax */ function initPage(&$out) { SkinTemplate::initPage($out); $this->skinname = 'gumax'; $this->stylename = 'gumax'; $this->template = 'GuMaxTemplate'; }
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')); }
function initPage(&$out) { SkinTemplate::initPage($out); $this->skinname = 'openkore'; $this->stylename = 'openkore'; $this->template = 'OpenKoreTemplate'; }
/** Using monobook. */ function initPage(&$out) { SkinTemplate::initPage($out); $this->skinname = 'fedora'; $this->stylename = 'fedora'; $this->template = 'FedoraTemplate'; }
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'); }
/** Using gforge. */ function initPage(&$out) { SkinTemplate::initPage($out); $this->skinname = 'gforge'; $this->stylename = 'gforge'; $this->template = 'GForgeTemplate'; }
/** * @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'); }
/** * 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 ); }
/** * 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); }
/** 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'; }
function initPage(OutputPage $out) { SkinTemplate::initPage($out); $this->skinname = 'simple'; $this->stylename = 'simple'; $this->template = 'MonoBookTemplate'; }
/** * @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'; }
function setupSkinUserCss(OutputPage $out) { parent::setupSkinUserCss($out); // Add CSS & JS $out->addModuleStyles(array('skins.nimbus', 'skins.monobook')); $out->addModuleScripts('skins.nimbus'); }