From ca32f08966f1b51fcb19460f0996bb0c4048e6fe Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 3 Dec 2011 13:29:22 +0100 Subject: Update to MediaWiki 1.18.0 * also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing --- skins/Nostalgia.php | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) (limited to 'skins/Nostalgia.php') diff --git a/skins/Nostalgia.php b/skins/Nostalgia.php index 6c599b21..a4fd985d 100644 --- a/skins/Nostalgia.php +++ b/skins/Nostalgia.php @@ -14,19 +14,22 @@ if( !defined( 'MEDIAWIKI' ) ) { * @todo document * @ingroup Skins */ -class SkinNostalgia extends Skin { +class SkinNostalgia extends SkinLegacy { + var $skinname = 'nostalgia', $stylename = 'nostalgia', + $template = 'NostalgiaTemplate'; - function getStylesheet() { - return 'common/nostalgia.css'; + function setupSkinUserCss( OutputPage $out ){ + parent::setupSkinUserCss( $out ); + $out->addModuleStyles( 'skins.nostalgia' ); } - function getSkinName() { - return 'nostalgia'; - } +} + +class NostalgiaTemplate extends LegacyTemplate { function doBeforeContent() { $s = "\n
\n
\n"; - $s .= ''; + $s .= ''; $s .= $this->pageTitle(); $s .= $this->pageSubtitle() . "\n"; @@ -34,7 +37,7 @@ class SkinNostalgia extends Skin { $s .= '
'; $s .= $this->topLinks() . "\n
"; - $notice = wfGetSiteNotice(); + $notice = $this->getSkin()->getSiteNotice(); if( $notice ) { $s .= "\n
$notice
\n"; } @@ -45,7 +48,7 @@ class SkinNostalgia extends Skin { $s .= '
' . $ol; } - $cat = $this->getCategoryLinks(); + $cat = ''; if( $cat ) { $s .= '
' . $cat; } @@ -60,40 +63,41 @@ class SkinNostalgia extends Skin { global $wgOut, $wgUser; $sep = " |\n"; - $s = $this->mainPageLink() . $sep - . $this->specialLink( 'Recentchanges' ); + $s = $this->getSkin()->mainPageLink() . $sep + . Linker::specialLink( 'Recentchanges' ); if ( $wgOut->isArticle() ) { - $s .= $sep . '' . $this->editThisPage() . '' . $sep . $this->historyLink(); + $s .= $sep . '' . $this->editThisPage() . '' . $sep . $this->talkLink() . + $sep . $this->historyLink(); } /* show links to different language variants */ $s .= $this->variantLinks(); $s .= $this->extensionTabLinks(); if ( $wgUser->isAnon() ) { - $s .= $sep . $this->specialLink( 'Userlogin' ); + $s .= $sep . Linker::specialLink( 'Userlogin' ); } else { /* show user page and user talk links */ - $s .= $sep . $this->link( $wgUser->getUserPage(), wfMsgHtml( 'mypage' ) ); - $s .= $sep . $this->link( $wgUser->getTalkPage(), wfMsgHtml( 'mytalk' ) ); + $s .= $sep . Linker::link( $wgUser->getUserPage(), wfMsgHtml( 'mypage' ) ); + $s .= $sep . Linker::link( $wgUser->getTalkPage(), wfMsgHtml( 'mytalk' ) ); if ( $wgUser->getNewtalk() ) { $s .= ' *'; } /* show watchlist link */ - $s .= $sep . $this->specialLink( 'Watchlist' ); + $s .= $sep . Linker::specialLink( 'Watchlist' ); /* show my contributions link */ - $s .= $sep . $this->link( + $s .= $sep . Linker::link( SpecialPage::getSafeTitleFor( 'Contributions', $wgUser->getName() ), wfMsgHtml( 'mycontris' ) ); /* show my preferences link */ - $s .= $sep . $this->specialLink( 'Preferences' ); + $s .= $sep . Linker::specialLink( 'Preferences' ); /* show upload file link */ if( UploadBase::isEnabled() && UploadBase::isAllowed( $wgUser ) === true ) { $s .= $sep . $this->getUploadLink(); } /* show log out link */ - $s .= $sep . $this->specialLink( 'Userlogout' ); + $s .= $sep . $this->getSkin()->specialLink( 'Userlogout' ); } $s .= $sep . $this->specialPagesList(); @@ -108,8 +112,8 @@ class SkinNostalgia extends Skin { $s .= $this->bottomLinks(); $s .= "\n
" . $this->pageStats(); - $s .= "\n
" . $this->mainPageLink() - . ' | ' . $this->aboutLink() + $s .= "\n
" . $this->getSkin()->mainPageLink() + . ' | ' . $this->getSkin()->aboutLink() . ' | ' . $this->searchForm(); $s .= "\n
\n
\n"; -- cgit v1.2.3-54-g00ecf