| 1 | <?php |
| 2 | /** |
| 3 | * See docs/skin.txt |
| 4 | * |
| 5 | * @todo document |
| 6 | * @file |
| 7 | * @ingroup Skins |
| 8 | */ |
| 9 | |
| 10 | if( !defined( 'MEDIAWIKI' ) ) |
| 11 | die( -1 ); |
| 12 | |
| 13 | /** |
| 14 | * @todo document |
| 15 | * @ingroup Skins |
| 16 | */ |
| 17 | class SkinNostalgia extends Skin { |
| 18 | |
| 19 | function getStylesheet() { |
| 20 | return 'common/nostalgia.css'; |
| 21 | } |
| 22 | function getSkinName() { |
| 23 | return "nostalgia"; |
| 24 | } |
| 25 | |
| 26 | function doBeforeContent() { |
| 27 | $s = "\n<div id='content'>\n<div id='top'>\n"; |
| 28 | $s .= "<div id=\"logo\">".$this->logoText( "right" )."</div>"; |
| 29 | |
| 30 | $s .= $this->pageTitle(); |
| 31 | $s .= $this->pageSubtitle() . "\n"; |
| 32 | |
| 33 | $s .= "<div id=\"topbar\">"; |
| 34 | $s .= $this->topLinks() . "\n<br />"; |
| 35 | |
| 36 | $notice = wfGetSiteNotice(); |
| 37 | if( $notice ) { |
| 38 | $s .= "\n<div id='siteNotice'>$notice</div>\n"; |
| 39 | } |
| 40 | $s .= $this->pageTitleLinks(); |
| 41 | |
| 42 | $ol = $this->otherLanguages(); |
| 43 | if($ol) $s .= "<br />" . $ol; |
| 44 | |
| 45 | $cat = $this->getCategoryLinks(); |
| 46 | if($cat) $s .= "<br />" . $cat; |
| 47 | |
| 48 | $s .= "<br clear='all' /></div><hr />\n</div |
| 49 | >\n"; |
| 50 | $s .= "\n<div id='article'>"; |
| 51 | |
| 52 | return $s; |
| 53 | } |
| 54 | |
| 55 | function topLinks() { |
| 56 | global $wgOut, $wgUser, $wgEnableUploads; |
| 57 | $sep = " |\n"; |
| 58 | |
| 59 | $s = $this->mainPageLink() . $sep |
| 60 | . $this->specialLink( 'recentchanges' ); |
| 61 | |
| 62 | if ( $wgOut->isArticle() ) { |
| 63 | $s .= $sep . $this->editThisPage() |
| 64 | . $sep . $this->historyLink(); |
| 65 | } |
| 66 | |
| 67 | /* show links to different language variants */ |
| 68 | $s .= $this->variantLinks(); |
| 69 | $s .= $this->extensionTabLinks(); |
| 70 | if ( $wgUser->isAnon() ) { |
| 71 | $s .= $sep . $this->specialLink( 'userlogin' ); |
| 72 | } else { |
| 73 | $name = $wgUser->getName(); |
| 74 | /* show user page and user talk links */ |
| 75 | $s .= $sep . $this->link( $wgUser->getUserPage(), wfMsgHtml( 'mypage' ) ); |
| 76 | $s .= $sep . $this->link( $wgUser->getTalkPage(), wfMsgHtml( 'mytalk' ) ); |
| 77 | if ( $wgUser->getNewtalk() ) { |
| 78 | $s .= ' *'; |
| 79 | } |
| 80 | /* show watchlist link */ |
| 81 | $s .= $sep . $this->specialLink( 'watchlist' ); |
| 82 | /* show my contributions link */ |
| 83 | $s .= $sep . $this->link( |
| 84 | SpecialPage::getSafeTitleFor( "Contributions", $wgUser->getName() ), |
| 85 | wfMsgHtml( 'mycontris' ) ); |
| 86 | /* show my preferences link */ |
| 87 | $s .= $sep . $this->specialLink( 'preferences' ); |
| 88 | /* show upload file link */ |
| 89 | if ( $wgEnableUploads ) { |
| 90 | $s .= $sep . $this->specialLink( 'upload' ); |
| 91 | } |
| 92 | /* show log out link */ |
| 93 | $s .= $sep . $this->specialLink( 'userlogout' ); |
| 94 | } |
| 95 | |
| 96 | $s .= $sep . $this->specialPagesList(); |
| 97 | |
| 98 | return $s; |
| 99 | } |
| 100 | |
| 101 | function doAfterContent() { |
| 102 | $s = "\n</div><br clear='all' />\n"; |
| 103 | |
| 104 | $s .= "\n<div id='footer'><hr />"; |
| 105 | |
| 106 | $s .= $this->bottomLinks(); |
| 107 | $s .= "\n<br />" . $this->pageStats(); |
| 108 | $s .= "\n<br />" . $this->mainPageLink() |
| 109 | . " | " . $this->aboutLink() |
| 110 | . " | " . $this->searchForm(); |
| 111 | |
| 112 | $s .= "\n</div>\n</div>\n"; |
| 113 | |
| 114 | return $s; |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | |