00001 <?php 00010 if( !defined( 'MEDIAWIKI' ) ) 00011 die( -1 ); 00012 00014 require_once( dirname(__FILE__) . '/MonoBook.php' ); 00015 00020 class SkinSimple extends SkinTemplate { 00021 function initPage( OutputPage $out ) { 00022 SkinTemplate::initPage( $out ); 00023 $this->skinname = 'simple'; 00024 $this->stylename = 'simple'; 00025 $this->template = 'MonoBookTemplate'; 00026 } 00027 00028 function setupSkinUserCss( OutputPage $out ){ 00029 $out->addStyle( 'simple/main.css', 'screen' ); 00030 $out->addStyle( 'simple/rtl.css', '', '', 'rtl' ); 00031 00032 } 00033 00034 function reallyGenerateUserStylesheet() { 00035 global $wgUser; 00036 $s = ''; 00037 if (($undopt = $wgUser->getOption("underline")) != 2) { 00038 $underline = $undopt ? 'underline' : 'none'; 00039 $s .= "a { text-decoration: $underline; }\n"; 00040 } 00041 if ($wgUser->getOption('highlightbroken')) { 00042 $s .= "a.new, #quickbar a.new { text-decoration: line-through; }\n"; 00043 } else { 00044 $s .= <<<END 00045 a.new, #quickbar a.new, 00046 a.stub, #quickbar a.stub { 00047 color: inherit; 00048 text-decoration: inherit; 00049 } 00050 a.new:after, #quickbar a.new:after { 00051 content: "?"; 00052 color: #CC2200; 00053 text-decoration: $underline; 00054 } 00055 a.stub:after, #quickbar a.stub:after { 00056 content: "!"; 00057 color: #772233; 00058 text-decoration: $underline; 00059 } 00060 END; 00061 } 00062 if ($wgUser->getOption('justify')) { 00063 $s .= "#article, #bodyContent { text-align: justify; }\n"; 00064 } 00065 if (!$wgUser->getOption('showtoc')) { 00066 $s .= "#toc { display: none; }\n"; 00067 } 00068 if (!$wgUser->getOption('editsection')) { 00069 $s .= ".editsection { display: none; }\n"; 00070 } 00071 return $s; 00072 } 00073 } 00074 00075