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