X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;ds=sidebyside;f=skins%2FNostalgia.php;h=24dc90bc605240a98188a02b59b17c8c7babe4e6;hb=0eff4a299f4b8d6a0cd2b6ee2a0db0212f07ec9f;hp=1bb180ed9180a2b2164a457f5055ac181993ad68;hpb=c771fc9c96aacb44b86ade5ecca68334c5d8213f;p=lhc%2Fweb%2Fwiklou.git diff --git a/skins/Nostalgia.php b/skins/Nostalgia.php index 1bb180ed91..24dc90bc60 100644 --- a/skins/Nostalgia.php +++ b/skins/Nostalgia.php @@ -1,82 +1,122 @@ addModuleStyles( 'skins.nostalgia' ); } - function doBeforeContent() { +} - $s = "\n
\n
"; - $s .= $this->logoText( "right" ); +class NostalgiaTemplate extends LegacyTemplate { + + /** + * @return string + */ + function doBeforeContent() { + $s = "\n
\n
\n"; + $s .= ''; $s .= $this->pageTitle(); $s .= $this->pageSubtitle() . "\n"; + $s .= '
'; $s .= $this->topLinks() . "\n
"; - $notice = wfGetSiteNotice(); + $notice = $this->getSkin()->getSiteNotice(); if( $notice ) { $s .= "\n
$notice
\n"; } $s .= $this->pageTitleLinks(); $ol = $this->otherLanguages(); - if($ol) $s .= "
" . $ol; + if( $ol ) { + $s .= '
' . $ol; + } - $cat = $this->getCategoryLinks(); - if($cat) $s .= "
" . $cat; + $cat = $this->getSkin()->getCategoryLinks(); + if( $cat ) { + $s .= '
' . $cat; + } - $s .= "

\n
\n"; + $s .= "

\n
\n"; $s .= "\n
"; return $s; } + /** + * @return string + */ function topLinks() { 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 { - $s .= $sep . $this->specialLink( "userlogout" ); + /* show user page and user talk links */ + $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 . Linker::specialLink( 'Watchlist' ); + /* show my contributions link */ + $s .= $sep . Linker::link( + SpecialPage::getSafeTitleFor( 'Contributions', $wgUser->getName() ), + wfMsgHtml( 'mycontris' ) ); + /* show my preferences link */ + $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->getSkin()->specialLink( 'Userlogout' ); } - + $s .= $sep . $this->specialPagesList(); return $s; } + /** + * @return string + */ function doAfterContent() { $s = "\n

\n"; @@ -84,14 +124,12 @@ class SkinNostalgia extends Skin { $s .= $this->bottomLinks(); $s .= "\n
" . $this->pageStats(); - $s .= "\n
" . $this->mainPageLink() - . " | " . $this->aboutLink() - . " | " . $this->searchForm(); + $s .= "\n
" . $this->getSkin()->mainPageLink() + . ' | ' . $this->getSkin()->aboutLink() + . ' | ' . $this->searchForm(); $s .= "\n
\n
\n"; return $s; } } - -?>