(bug 16497) Paginate Special:AllMessages
[lhc/web/wiklou.git] / skins / Simple.php
1 <?php
2 /**
3 * Simple: A lightweight skin with a simple white-background sidebar and no
4 * top bar.
5 *
6 * @file
7 * @ingroup Skins
8 */
9
10 if( !defined( 'MEDIAWIKI' ) )
11 die( -1 );
12
13 /** */
14 require_once( dirname(__FILE__) . '/MonoBook.php' );
15
16 /**
17 * Inherit main code from SkinTemplate, set the CSS and template filter.
18 * @ingroup Skins
19 */
20 class SkinSimple extends SkinTemplate {
21 function initPage( OutputPage $out ) {
22 parent::initPage( $out );
23 $this->skinname = 'simple';
24 $this->stylename = 'simple';
25 $this->template = 'MonoBookTemplate';
26 }
27
28 function setupSkinUserCss( OutputPage $out ){
29 $out->addStyle( 'simple/main.css', 'screen' );
30 $out->addStyle( 'simple/rtl.css', '', '', 'rtl' );
31 }
32
33 function reallyGenerateUserStylesheet() {
34 global $wgUser;
35 $s = '';
36 if( ( $undopt = $wgUser->getOption( 'underline' ) ) != 2 ) {
37 $underline = $undopt ? 'underline' : 'none';
38 $s .= "a { text-decoration: $underline; }\n";
39 }
40 if( $wgUser->getOption( 'highlightbroken' ) ) {
41 $s .= "a.new, #quickbar a.new { text-decoration: line-through; }\n";
42 } else {
43 $s .= <<<END
44 a.new, #quickbar a.new,
45 a.stub, #quickbar a.stub {
46 color: inherit;
47 text-decoration: inherit;
48 }
49 a.new:after, #quickbar a.new:after {
50 content: "?";
51 color: #CC2200;
52 text-decoration: $underline;
53 }
54 a.stub:after, #quickbar a.stub:after {
55 content: "!";
56 color: #772233;
57 text-decoration: $underline;
58 }
59 END;
60 }
61 if( $wgUser->getOption( 'justify' ) ) {
62 $s .= "#article, #bodyContent { text-align: justify; }\n";
63 }
64 if( !$wgUser->getOption( 'showtoc' ) ) {
65 $s .= "#toc { display: none; }\n";
66 }
67 if( !$wgUser->getOption( 'editsection' ) ) {
68 $s .= ".editsection { display: none; }\n";
69 }
70 return $s;
71 }
72 }