X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=skins%2FSimple.php;h=0e1668b137a36bd9aa4829e30101baafa0e44806;hb=ae7408460d9a32ec7629c21b967424d72467817b;hp=2690f7833c59ece5b87a1ccbd07154490893cf92;hpb=e8aa289e486fd9cd43c895cc4f1640934ed3b365;p=lhc%2Fweb%2Fwiklou.git diff --git a/skins/Simple.php b/skins/Simple.php index 2690f7833c..0e1668b137 100644 --- a/skins/Simple.php +++ b/skins/Simple.php @@ -18,55 +18,26 @@ require_once( dirname(__FILE__) . '/MonoBook.php' ); * @ingroup Skins */ class SkinSimple extends SkinTemplate { - function initPage( OutputPage $out ) { - parent::initPage( $out ); - $this->skinname = 'simple'; - $this->stylename = 'simple'; - $this->template = 'MonoBookTemplate'; - } + var $skinname = 'simple', $stylename = 'simple', + $template = 'MonoBookTemplate', $useHeadElement = true; - function setupSkinUserCss( OutputPage $out ){ - $out->addStyle( 'simple/main.css', 'screen' ); - $out->addStyle( 'simple/rtl.css', '', '', 'rtl' ); - } + /** + * @param $out OutputPage + */ + function setupSkinUserCss( OutputPage $out ) { + parent::setupSkinUserCss( $out ); - function reallyGenerateUserStylesheet() { - global $wgUser; - $s = ''; - if( ( $undopt = $wgUser->getOption( 'underline' ) ) != 2 ) { - $underline = $undopt ? 'underline' : 'none'; - $s .= "a { text-decoration: $underline; }\n"; - } - if( $wgUser->getOption( 'highlightbroken' ) ) { - $s .= "a.new, #quickbar a.new { text-decoration: line-through; }\n"; - } else { - $s .= <<getOption( 'justify' ) ) { - $s .= "#article, #bodyContent { text-align: justify; }\n"; - } - if( !$wgUser->getOption( 'showtoc' ) ) { - $s .= "#toc { display: none; }\n"; - } - if( !$wgUser->getOption( 'editsection' ) ) { - $s .= ".editsection { display: none; }\n"; + $out->addModuleStyles( 'skins.simple' ); + + /* Add some userprefs specific CSS styling */ + $rules = array(); + $underline = ""; + + if ( $this->getUser()->getOption( 'underline' ) < 2 ) { + $underline = "text-decoration: " . $this->getUser()->getOption( 'underline' ) ? 'underline !important' : 'none' . ";"; } - return $s; + $style = implode( "\n", $rules ); + $out->addInlineStyle( $style, 'flip' ); + } }