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