X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=skins%2FNostalgia.php;h=21d3578d816f214841cc7c9f99c1099f6fbfb619;hb=f742577ac8151e58e440d65d6b5457445f6b9932;hp=d29aaf8f65b089d3338b328286d38e0f8322c90f;hpb=0ec30e2f98b1cf1c6cfd7da8ac6bdfd4f207e920;p=lhc%2Fweb%2Fwiklou.git diff --git a/skins/Nostalgia.php b/skins/Nostalgia.php index d29aaf8f65..21d3578d81 100644 --- a/skins/Nostalgia.php +++ b/skins/Nostalgia.php @@ -1,98 +1,132 @@ addModuleStyles( 'skins.nostalgia' ); } - function getStylesheet() { - return 'common/nostalgia.css'; - } - function getSkinName() { - return "nostalgia"; - } +} - function doBeforeContent() { - global $wgUser, $wgOut, $wgTitle, $wgSiteNotice; +class NostalgiaTemplate extends LegacyTemplate { - $s = "\n
\n
"; - $s .= $this->logoText( "right" ); + /** + * @return string + */ + function doBeforeContent() { + $s = "\n
\n
\n"; + $s .= ''; $s .= $this->pageTitle(); $s .= $this->pageSubtitle() . "\n"; + $s .= '
'; $s .= $this->topLinks() . "\n
"; - if( $wgSiteNotice ) { - $s .= "\n
$wgSiteNotice
\n"; + + $notice = $this->getSkin()->getSiteNotice(); + if( $notice ) { + $s .= "\n
$notice
\n"; } $s .= $this->pageTitleLinks(); $ol = $this->otherLanguages(); - if($ol) $s .= "
" . $ol; - - $cat = $this->getCategoryLinks(); - if($cat) $s .= "
" . $cat; + if( $ol ) { + $s .= '
' . $ol; + } - $s .= "

\n
\n"; + $s .= $this->getSkin()->getCategories(); + + $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(); + if ( $this->data['isarticle'] ) { + $s .= $sep . '' . $this->editThisPage() . '' . $sep . $this->talkLink() . + $sep . $this->historyLink(); } - if ( 0 == $wgUser->getID() ) { - $s .= $sep . $this->specialLink( "userlogin" ); + + /* show links to different language variants */ + $s .= $this->variantLinks(); + $s .= $this->extensionTabLinks(); + if ( !$this->data['loggedin'] ) { + $s .= $sep . Linker::specialLink( 'Userlogin' ); } else { - $s .= $sep . $this->specialLink( "userlogout" ); + /* show user page and user talk links */ + $user = $this->getSkin()->getUser(); + $s .= $sep . Linker::link( $user->getUserPage(), wfMsgHtml( 'mypage' ) ); + $s .= $sep . Linker::link( $user->getTalkPage(), wfMsgHtml( 'mytalk' ) ); + if ( $user->getNewtalk() ) { + $s .= ' *'; + } + /* show watchlist link */ + $s .= $sep . Linker::specialLink( 'Watchlist' ); + /* show my contributions link */ + $s .= $sep . Linker::link( + SpecialPage::getSafeTitleFor( 'Contributions', $this->data['username'] ), + wfMsgHtml( 'mycontris' ) ); + /* show my preferences link */ + $s .= $sep . Linker::specialLink( 'Preferences' ); + /* show upload file link */ + if( UploadBase::isEnabled() && UploadBase::isAllowed( $user ) === true ) { + $s .= $sep . $this->getUploadLink(); + } + + /* show log out link */ + $s .= $sep . Linker::specialLink( 'Userlogout' ); } + $s .= $sep . $this->specialPagesList(); return $s; } + /** + * @return string + */ function doAfterContent() { - global $wgUser, $wgOut; - $s = "\n

\n"; $s .= "\n\n
\n"; return $s; } } - -?>