d4dee0f429f57decc8e038fd17675cbdd8573bf9
[lhc/web/wiklou.git] / skins / Nostalgia.php
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>\n";
49 $s .= "\n<div id='article'>";
50
51 return $s;
52 }
53
54 function topLinks() {
55 global $wgOut, $wgUser, $wgEnableUploads;
56 $sep = " |\n";
57
58 $s = $this->mainPageLink() . $sep
59 . $this->specialLink( 'recentchanges' );
60
61 if ( $wgOut->isArticle() ) {
62 $s .= $sep . '<strong>' . $this->editThisPage() . '</strong>' . $sep . $this->historyLink();
63 }
64
65 /* show links to different language variants */
66 $s .= $this->variantLinks();
67 $s .= $this->extensionTabLinks();
68 if ( $wgUser->isAnon() ) {
69 $s .= $sep . $this->specialLink( 'userlogin' );
70 } else {
71 $name = $wgUser->getName();
72 /* show user page and user talk links */
73 $s .= $sep . $this->link( $wgUser->getUserPage(), wfMsgHtml( 'mypage' ) );
74 $s .= $sep . $this->link( $wgUser->getTalkPage(), wfMsgHtml( 'mytalk' ) );
75 if ( $wgUser->getNewtalk() ) {
76 $s .= ' *';
77 }
78 /* show watchlist link */
79 $s .= $sep . $this->specialLink( 'watchlist' );
80 /* show my contributions link */
81 $s .= $sep . $this->link(
82 SpecialPage::getSafeTitleFor( "Contributions", $wgUser->getName() ),
83 wfMsgHtml( 'mycontris' ) );
84 /* show my preferences link */
85 $s .= $sep . $this->specialLink( 'preferences' );
86 /* show upload file link */
87 if ( $wgEnableUploads ) {
88 $s .= $sep . $this->specialLink( 'upload' );
89 }
90 /* show log out link */
91 $s .= $sep . $this->specialLink( 'userlogout' );
92 }
93
94 $s .= $sep . $this->specialPagesList();
95
96 return $s;
97 }
98
99 function doAfterContent() {
100 $s = "\n</div><br clear='all' />\n";
101
102 $s .= "\n<div id='footer'><hr />";
103
104 $s .= $this->bottomLinks();
105 $s .= "\n<br />" . $this->pageStats();
106 $s .= "\n<br />" . $this->mainPageLink()
107 . " | " . $this->aboutLink()
108 . " | " . $this->searchForm();
109
110 $s .= "\n</div>\n</div>\n";
111
112 return $s;
113 }
114 }
115
116