live hack by Brion to improve performance
[lhc/web/wiklou.git] / skins / Simple.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();
12
13 /** */
14 require_once('MonoBook.php');
15
16 /**
17 * @todo document
18 * @package MediaWiki
19 * @subpackage Skins
20 */
21 class SkinSimple extends SkinTemplate {
22 function initPage( &$out ) {
23 SkinTemplate::initPage( $out );
24 $this->skinname = 'simple';
25 $this->stylename = 'simple';
26 $this->template = 'MonoBookTemplate';
27 }
28
29 function reallyDoGetUserStyles() {
30 global $wgUser;
31 $s = '';
32 $s .= "/* highlightbroken: " . $wgUser->getOption('highlightbroken') . " */\n";
33 if (($undopt = $wgUser->getOption("underline")) != 2) {
34 $underline = $undopt ? 'underline' : 'none';
35 $s .= "a { text-decoration: $underline; }\n";
36 }
37 if (!$wgUser->getOption('highlightbroken')) {
38 $s .= "a.new, #quickbar a.new { text-decoration: line-through; }\n";
39 } else {
40 $s .= <<<END
41 a.new, #quickbar a.new,
42 a.stub, #quickbar a.stub {
43 color: inherit;
44 text-decoration: inherit;
45 }
46 a.new:after, #quickbar a.new:after {
47 content: "?";
48 color: #CC2200;
49 text-decoration: $underline;
50 }
51 a.stub:after, #quickbar a.stub:after {
52 content: "!";
53 color: #772233;
54 text-decoration: $underline;
55 }
56 END;
57 }
58 if ($wgUser->getOption('justify')) {
59 $s .= "#article, #bodyContent { text-align: justify; }\n";
60 }
61 if (!$wgUser->getOption('showtoc')) {
62 $s .= "#toc { display: none; }\n";
63 }
64 if (!$wgUser->getOption('editsection')) {
65 $s .= ".editsection { display: none; }\n";
66 }
67 return $s;
68 }
69 }
70
71 ?>