blob: a4fd985d0249578704c558df9c6b8e7ababcfb76 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
<?php
/**
* Nostalgia: A skin which looks like Wikipedia did in its first year (2001).
*
* @file
* @ingroup Skins
*/
if( !defined( 'MEDIAWIKI' ) ) {
die( -1 );
}
/**
* @todo document
* @ingroup Skins
*/
class SkinNostalgia extends SkinLegacy {
var $skinname = 'nostalgia', $stylename = 'nostalgia',
$template = 'NostalgiaTemplate';
function setupSkinUserCss( OutputPage $out ){
parent::setupSkinUserCss( $out );
$out->addModuleStyles( 'skins.nostalgia' );
}
}
class NostalgiaTemplate extends LegacyTemplate {
function doBeforeContent() {
$s = "\n<div id='content'>\n<div id='top'>\n";
$s .= '<div id="logo">' . $this->getSkin()->logoText( 'right' ) . '</div>';
$s .= $this->pageTitle();
$s .= $this->pageSubtitle() . "\n";
$s .= '<div id="topbar">';
$s .= $this->topLinks() . "\n<br />";
$notice = $this->getSkin()->getSiteNotice();
if( $notice ) {
$s .= "\n<div id='siteNotice'>$notice</div>\n";
}
$s .= $this->pageTitleLinks();
$ol = $this->otherLanguages();
if( $ol ) {
$s .= '<br />' . $ol;
}
$cat = '<div id="catlinks" class="catlinks">' . $this->getSkin()->getCategoryLinks() . '</div>';
if( $cat ) {
$s .= '<br />' . $cat;
}
$s .= "<br clear='all' /></div><hr />\n</div>\n";
$s .= "\n<div id='article'>";
return $s;
}
function topLinks() {
global $wgOut, $wgUser;
$sep = " |\n";
$s = $this->getSkin()->mainPageLink() . $sep
. Linker::specialLink( 'Recentchanges' );
if ( $wgOut->isArticle() ) {
$s .= $sep . '<strong>' . $this->editThisPage() . '</strong>' . $sep . $this->talkLink() .
$sep . $this->historyLink();
}
/* show links to different language variants */
$s .= $this->variantLinks();
$s .= $this->extensionTabLinks();
if ( $wgUser->isAnon() ) {
$s .= $sep . Linker::specialLink( 'Userlogin' );
} else {
/* show user page and user talk links */
$s .= $sep . Linker::link( $wgUser->getUserPage(), wfMsgHtml( 'mypage' ) );
$s .= $sep . Linker::link( $wgUser->getTalkPage(), wfMsgHtml( 'mytalk' ) );
if ( $wgUser->getNewtalk() ) {
$s .= ' *';
}
/* show watchlist link */
$s .= $sep . Linker::specialLink( 'Watchlist' );
/* show my contributions link */
$s .= $sep . Linker::link(
SpecialPage::getSafeTitleFor( 'Contributions', $wgUser->getName() ),
wfMsgHtml( 'mycontris' ) );
/* show my preferences link */
$s .= $sep . Linker::specialLink( 'Preferences' );
/* show upload file link */
if( UploadBase::isEnabled() && UploadBase::isAllowed( $wgUser ) === true ) {
$s .= $sep . $this->getUploadLink();
}
/* show log out link */
$s .= $sep . $this->getSkin()->specialLink( 'Userlogout' );
}
$s .= $sep . $this->specialPagesList();
return $s;
}
function doAfterContent() {
$s = "\n</div><br clear='all' />\n";
$s .= "\n<div id='footer'><hr />";
$s .= $this->bottomLinks();
$s .= "\n<br />" . $this->pageStats();
$s .= "\n<br />" . $this->getSkin()->mainPageLink()
. ' | ' . $this->getSkin()->aboutLink()
. ' | ' . $this->searchForm();
$s .= "\n</div>\n</div>\n";
return $s;
}
}
|