Fix language links on special/preview pages in Nostalgia
[lhc/web/wiklou.git] / includes / SkinNostalgia.php
1 <?
2 # See skin.doc
3
4 class SkinNostalgia extends Skin {
5
6 function initPage()
7 {
8 global $wgOut, $wgStyleSheetPath;
9
10 $wgOut->addLink( "stylesheet", "",
11 "$wgStyleSheetPath/nostalgia.css" );
12 }
13
14 function doBeforeContent()
15 {
16 global $wgUser, $wgOut, $wgTitle;
17
18 $s = "\n<div id='content'>\n<div id='topbar'>";
19 $s .= $this->logoText( "right" );
20
21 $s .= $this->pageTitle();
22 $s .= $this->pageSubtitle() . "\n<p>";
23
24 $s .= $this->topLinks() . "\n<br>";
25 $s .= $this->pageTitleLinks();
26
27 $ol = $this->otherLanguages();
28 if($ol) $s .= "<br>" . $ol;
29
30 $s .= "<br clear=all><hr>\n</div>\n";
31 $s .= "\n<div id='article'>";
32
33 return $s;
34 }
35
36 function topLinks()
37 {
38 global $wgOut, $wgUser;
39 $sep = " |\n";
40
41 $s = $this->mainPageLink() . $sep
42 . $this->specialLink( "recentchanges" );
43
44 if ( $wgOut->isArticle() ) {
45 $s .= $sep . $this->editThisPage()
46 . $sep . $this->historyLink();
47 }
48 if ( 0 == $wgUser->getID() ) {
49 $s .= $sep . $this->specialLink( "userlogin" );
50 } else {
51 $s .= $sep . $this->specialLink( "userlogout" );
52 }
53 $s .= $sep . $this->specialPagesList();
54
55 return $s;
56 }
57
58 function doAfterContent()
59 {
60 global $wgUser, $wgOut;
61
62 $s = "\n</div><br clear=all>\n";
63
64 $s .= "\n<div id='footer'><hr>";
65
66 $s .= $this->bottomLinks();
67 $s .= "\n<br>" . $this->pageStats();
68 $s .= "\n<br>" . $this->mainPageLink()
69 . " | " . $this->aboutLink()
70 . " | " . $this->searchForm();
71
72 $s .= "\n</div>\n</div>\n";
73
74 return $s;
75 }
76 }
77
78 ?>