X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=skins%2FNostalgia.php;h=21d3578d816f214841cc7c9f99c1099f6fbfb619;hb=f742577ac8151e58e440d65d6b5457445f6b9932;hp=1d76a951ac467f532daf81f7bd686dabfe3e71de;hpb=08c34c839ad98fc907ca78cbb11d47618235911e;p=lhc%2Fweb%2Fwiklou.git diff --git a/skins/Nostalgia.php b/skins/Nostalgia.php index 1d76a951ac..21d3578d81 100644 --- a/skins/Nostalgia.php +++ b/skins/Nostalgia.php @@ -1,82 +1,119 @@ 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; + $s .= $this->getSkin()->getCategories(); - $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(); - } - if ( $wgUser->isAnon() ) { - $s .= $sep . $this->specialLink( "userlogin" ); - } else { - $s .= $sep . $this->specialLink( "userlogout" ); + if ( $this->data['isarticle'] ) { + $s .= $sep . '' . $this->editThisPage() . '' . $sep . $this->talkLink() . + $sep . $this->historyLink(); } - + /* show links to different language variants */ $s .= $this->variantLinks(); - + $s .= $this->extensionTabLinks(); + if ( !$this->data['loggedin'] ) { + $s .= $sep . Linker::specialLink( 'Userlogin' ); + } else { + /* 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() { $s = "\n

\n"; @@ -84,14 +121,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; } } - -?>