* Added wfDie() wrapper, and some manual die(-1), to force the return code
[lhc/web/wiklou.git] / skins / Nostalgia.php
1 <?php
2 /**
3 * See skin.txt
4 *
5 * @todo document
6 * @package MediaWiki
7 * @subpackage Skins
8 */
9
10 if( !defined( 'MEDIAWIKI' ) )
11 die( -1 );
12
13 /**
14 * @todo document
15 * @package MediaWiki
16 * @subpackage Skins
17 */
18 class SkinNostalgia extends Skin {
19
20 function getStylesheet() {
21 return 'common/nostalgia.css?1';
22 }
23 function getSkinName() {
24 return "nostalgia";
25 }
26
27 function doBeforeContent() {
28 global $wgUser, $wgOut, $wgTitle;
29
30 $s = "\n<div id='content'>\n<div id='topbar'>";
31 $s .= $this->logoText( "right" );
32
33 $s .= $this->pageTitle();
34 $s .= $this->pageSubtitle() . "\n";
35
36 $s .= $this->topLinks() . "\n<br />";
37
38 $notice = wfGetSiteNotice();
39 if( $notice ) {
40 $s .= "\n<div id='siteNotice'>$notice</div>\n";
41 }
42 $s .= $this->pageTitleLinks();
43
44 $ol = $this->otherLanguages();
45 if($ol) $s .= "<br />" . $ol;
46
47 $cat = $this->getCategoryLinks();
48 if($cat) $s .= "<br />" . $cat;
49
50 $s .= "<br clear='all' /><hr />\n</div>\n";
51 $s .= "\n<div id='article'>";
52
53 return $s;
54 }
55
56 function topLinks() {
57 global $wgOut, $wgUser;
58 $sep = " |\n";
59
60 $s = $this->mainPageLink() . $sep
61 . $this->specialLink( "recentchanges" );
62
63 if ( $wgOut->isArticle() ) {
64 $s .= $sep . $this->editThisPage()
65 . $sep . $this->historyLink();
66 }
67 if ( $wgUser->isAnon() ) {
68 $s .= $sep . $this->specialLink( "userlogin" );
69 } else {
70 $s .= $sep . $this->specialLink( "userlogout" );
71 }
72 $s .= $sep . $this->specialPagesList();
73
74 return $s;
75 }
76
77 function doAfterContent() {
78 $s = "\n</div><br clear='all' />\n";
79
80 $s .= "\n<div id='footer'><hr />";
81
82 $s .= $this->bottomLinks();
83 $s .= "\n<br />" . $this->pageStats();
84 $s .= "\n<br />" . $this->mainPageLink()
85 . " | " . $this->aboutLink()
86 . " | " . $this->searchForm();
87
88 $s .= "\n</div>\n</div>\n";
89
90 return $s;
91 }
92 }
93
94 ?>