Doc cleanup:
[lhc/web/wiklou.git] / skins / Simple.php
1 <?php
2 /**
3 * See docs/skin.txt
4 *
5 * @todo document
6 * @addtogroup Skins
7 */
8
9 if( !defined( 'MEDIAWIKI' ) )
10 die( -1 );
11
12 /** */
13 require_once( dirname(__FILE__) . '/MonoBook.php' );
14
15 /**
16 * @todo document
17 * @addtogroup Skins
18 */
19 class SkinSimple extends SkinTemplate {
20 function initPage( &$out ) {
21 SkinTemplate::initPage( $out );
22 $this->skinname = 'simple';
23 $this->stylename = 'simple';
24 $this->template = 'MonoBookTemplate';
25 }
26
27 function reallyDoGetUserStyles() {
28 global $wgUser;
29 $s = '';
30 if (($undopt = $wgUser->getOption("underline")) != 2) {
31 $underline = $undopt ? 'underline' : 'none';
32 $s .= "a { text-decoration: $underline; }\n";
33 }
34 if ($wgUser->getOption('highlightbroken')) {
35 $s .= "a.new, #quickbar a.new { text-decoration: line-through; }\n";
36 } else {
37 $s .= <<<END
38 a.new, #quickbar a.new,
39 a.stub, #quickbar a.stub {
40 color: inherit;
41 text-decoration: inherit;
42 }
43 a.new:after, #quickbar a.new:after {
44 content: "?";
45 color: #CC2200;
46 text-decoration: $underline;
47 }
48 a.stub:after, #quickbar a.stub:after {
49 content: "!";
50 color: #772233;
51 text-decoration: $underline;
52 }
53 END;
54 }
55 if ($wgUser->getOption('justify')) {
56 $s .= "#article, #bodyContent { text-align: justify; }\n";
57 }
58 if (!$wgUser->getOption('showtoc')) {
59 $s .= "#toc { display: none; }\n";
60 }
61 if (!$wgUser->getOption('editsection')) {
62 $s .= ".editsection { display: none; }\n";
63 }
64 return $s;
65 }
66 }
67
68