";
- $s .= $this->logoText( "right" );
+class NostalgiaTemplate extends LegacyTemplate {
+
+ /**
+ * @return string
+ */
+ function doBeforeContent() {
+ $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
\n
\n";
$s .= "\n\n";
+ $s .= '
' . $this->getSkin()->logoText( 'right' ) . '
';
$s .= $this->pageTitle();
$s .= $this->pageSubtitle() . "\n";
+ $s .= '';
$s .= $this->topLinks() . "\n
"; - $notice = wfGetSiteNotice(); + $notice = $this->getSkin()->getSiteNotice(); if( $notice ) { $s .= "\n
" . $ol; + if( $ol ) { + $s .= '
' . $ol; + } - $cat = $this->getCategoryLinks(); - if($cat) $s .= "
" . $cat; + $cat = $this->getSkin()->getCategoryLinks(); + if( $cat ) { + $s .= '
' . $cat; + } - $s .= "
\n
\n";
+ $s .= ""; - $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
";
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