(bug 15903) Add upload link to Nostalgia skin. Patch by Nikolaos S. Karastathis.
[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
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
71 if ( $wgUser->isAnon() ) {
72 $s .= $sep . $this->specialLink( "userlogin" );
73 } else {
74 if ( $wgEnableUploads ) {
75 $s .= $sep . $this->specialLink( "upload" );
76 }
77 $s .= $sep . $this->specialLink( "userlogout" );
78 }
79
80 $s .= $sep . $this->specialPagesList();
81
82 return $s;
83 }
84
85 function doAfterContent() {
86 $s = "\n</div><br clear='all' />\n";
87
88 $s .= "\n<div id='footer'><hr />";
89
90 $s .= $this->bottomLinks();
91 $s .= "\n<br />" . $this->pageStats();
92 $s .= "\n<br />" . $this->mainPageLink()
93 . " | " . $this->aboutLink()
94 . " | " . $this->searchForm();
95
96 $s .= "\n</div>\n</div>\n";
97
98 return $s;
99 }
100 }
101
102