00001 <?php 00010 if( !defined( 'MEDIAWIKI' ) ) 00011 die( -1 ); 00012 00017 class SkinNostalgia extends Skin { 00018 00019 function getStylesheet() { 00020 return 'common/nostalgia.css'; 00021 } 00022 function getSkinName() { 00023 return "nostalgia"; 00024 } 00025 00026 function doBeforeContent() { 00027 $s = "\n<div id='content'>\n<div id='top'>\n"; 00028 $s .= "<div id=\"logo\">".$this->logoText( "right" )."</div>"; 00029 00030 $s .= $this->pageTitle(); 00031 $s .= $this->pageSubtitle() . "\n"; 00032 00033 $s .= "<div id=\"topbar\">"; 00034 $s .= $this->topLinks() . "\n<br />"; 00035 00036 $notice = wfGetSiteNotice(); 00037 if( $notice ) { 00038 $s .= "\n<div id='siteNotice'>$notice</div>\n"; 00039 } 00040 $s .= $this->pageTitleLinks(); 00041 00042 $ol = $this->otherLanguages(); 00043 if($ol) $s .= "<br />" . $ol; 00044 00045 $cat = $this->getCategoryLinks(); 00046 if($cat) $s .= "<br />" . $cat; 00047 00048 $s .= "<br clear='all' /></div><hr />\n</div>\n"; 00049 $s .= "\n<div id='article'>"; 00050 00051 return $s; 00052 } 00053 00054 function topLinks() { 00055 global $wgOut, $wgUser, $wgEnableUploads; 00056 $sep = " |\n"; 00057 00058 $s = $this->mainPageLink() . $sep 00059 . $this->specialLink( 'recentchanges' ); 00060 00061 if ( $wgOut->isArticle() ) { 00062 $s .= $sep . '<strong>' . $this->editThisPage() . '</strong>' . $sep . $this->historyLink(); 00063 } 00064 00065 /* show links to different language variants */ 00066 $s .= $this->variantLinks(); 00067 $s .= $this->extensionTabLinks(); 00068 if ( $wgUser->isAnon() ) { 00069 $s .= $sep . $this->specialLink( 'userlogin' ); 00070 } else { 00071 $name = $wgUser->getName(); 00072 /* show user page and user talk links */ 00073 $s .= $sep . $this->link( $wgUser->getUserPage(), wfMsgHtml( 'mypage' ) ); 00074 $s .= $sep . $this->link( $wgUser->getTalkPage(), wfMsgHtml( 'mytalk' ) ); 00075 if ( $wgUser->getNewtalk() ) { 00076 $s .= ' *'; 00077 } 00078 /* show watchlist link */ 00079 $s .= $sep . $this->specialLink( 'watchlist' ); 00080 /* show my contributions link */ 00081 $s .= $sep . $this->link( 00082 SpecialPage::getSafeTitleFor( "Contributions", $wgUser->getName() ), 00083 wfMsgHtml( 'mycontris' ) ); 00084 /* show my preferences link */ 00085 $s .= $sep . $this->specialLink( 'preferences' ); 00086 /* show upload file link */ 00087 if ( $wgEnableUploads ) { 00088 $s .= $sep . $this->specialLink( 'upload' ); 00089 } 00090 /* show log out link */ 00091 $s .= $sep . $this->specialLink( 'userlogout' ); 00092 } 00093 00094 $s .= $sep . $this->specialPagesList(); 00095 00096 return $s; 00097 } 00098 00099 function doAfterContent() { 00100 $s = "\n</div><br clear='all' />\n"; 00101 00102 $s .= "\n<div id='footer'><hr />"; 00103 00104 $s .= $this->bottomLinks(); 00105 $s .= "\n<br />" . $this->pageStats(); 00106 $s .= "\n<br />" . $this->mainPageLink() 00107 . " | " . $this->aboutLink() 00108 . " | " . $this->searchForm(); 00109 00110 $s .= "\n</div>\n</div>\n"; 00111 00112 return $s; 00113 } 00114 } 00115 00116