]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - skins/Nostalgia.php
MediaWiki 1.15.0
[autoinstallsdev/mediawiki.git] / skins / Nostalgia.php
index 36ee7919e39066f815913fd273d16c6bbecf10a4..d4dee0f429f57decc8e038fd17675cbdd8573bf9 100644 (file)
@@ -1,26 +1,21 @@
 <?php
 /**
- * See skin.txt
+ * See docs/skin.txt
  *
  * @todo document
- * @package MediaWiki
- * @subpackage Skins
+ * @file
+ * @ingroup Skins
  */
 
 if( !defined( 'MEDIAWIKI' ) )
-       die();
+       die( -1 );
 
 /**
  * @todo document
- * @package MediaWiki
- * @subpackage Skins
+ * @ingroup Skins
  */
 class SkinNostalgia extends Skin {
 
-       function initPage() {
-               # ...
-       }
-
        function getStylesheet() {
                return 'common/nostalgia.css';
        }
@@ -29,14 +24,13 @@ class SkinNostalgia extends Skin {
        }
 
        function doBeforeContent() {
-               global $wgUser, $wgOut, $wgTitle;
-
-               $s = "\n<div id='content'>\n<div id='topbar'>";
-               $s .= $this->logoText( "right" );
+               $s = "\n<div id='content'>\n<div id='top'>\n";
+               $s .= "<div id=\"logo\">".$this->logoText( "right" )."</div>";
 
                $s .= $this->pageTitle();
                $s .= $this->pageSubtitle() . "\n";
 
+               $s .= "<div id=\"topbar\">";
                $s .= $this->topLinks() . "\n<br />";
 
                $notice = wfGetSiteNotice();
@@ -47,32 +41,56 @@ class SkinNostalgia extends Skin {
 
                $ol = $this->otherLanguages();
                if($ol) $s .= "<br />" . $ol;
-               
+
                $cat = $this->getCategoryLinks();
                if($cat) $s .= "<br />" . $cat;
 
-               $s .= "<br clear='all' /><hr />\n</div>\n";
+               $s .= "<br clear='all' /></div><hr />\n</div>\n";
                $s .= "\n<div id='article'>";
 
                return $s;
        }
 
        function topLinks() {
-               global $wgOut, $wgUser;
+               global $wgOut, $wgUser, $wgEnableUploads;
                $sep = " |\n";
 
                $s = $this->mainPageLink() . $sep
-                 . $this->specialLink( "recentchanges" );
+                 . $this->specialLink( 'recentchanges' );
 
                if ( $wgOut->isArticle() ) {
-                       $s .=  $sep . $this->editThisPage()
-                         . $sep . $this->historyLink();
+                       $s .= $sep . '<strong>' . $this->editThisPage() . '</strong>' . $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 . $this->specialLink( 'userlogin' );
                } else {
-                       $s .= $sep . $this->specialLink( "userlogout" );
+                       $name = $wgUser->getName();
+                       /* show user page and user talk links */
+                       $s .= $sep . $this->link( $wgUser->getUserPage(), wfMsgHtml( 'mypage' ) );
+                       $s .= $sep . $this->link( $wgUser->getTalkPage(), wfMsgHtml( 'mytalk' ) );
+                       if ( $wgUser->getNewtalk() ) {
+                               $s .= ' *';
+                       }
+                       /* show watchlist link */
+                       $s .= $sep . $this->specialLink( 'watchlist' );
+                       /* show my contributions link */
+                       $s .= $sep . $this->link(
+                               SpecialPage::getSafeTitleFor( "Contributions", $wgUser->getName() ),
+                               wfMsgHtml( 'mycontris' ) );
+                       /* show my preferences link */
+                       $s .= $sep . $this->specialLink( 'preferences' );
+                       /* show upload file link */
+                       if ( $wgEnableUploads ) {
+                               $s .= $sep . $this->specialLink( 'upload' );
+                       }
+                       /* show log out link */
+                       $s .= $sep . $this->specialLink( 'userlogout' );
                }
+
                $s .= $sep . $this->specialPagesList();
 
                return $s;
@@ -95,4 +113,4 @@ class SkinNostalgia extends Skin {
        }
 }
 
-?>
+