* (bug 30441) getParamValue must understand "+" encoding of space
[mediawiki.git] / skins / Simple.php
blob06443772ae75445589bbd7a6874d51df3bc5c683
1 <?php
2 /**
3 * Simple: A lightweight skin with a simple white-background sidebar and no
4 * top bar.
6 * @file
7 * @ingroup Skins
8 */
10 if( !defined( 'MEDIAWIKI' ) )
11 die( -1 );
13 /** */
14 require_once( dirname(__FILE__) . '/MonoBook.php' );
16 /**
17 * Inherit main code from SkinTemplate, set the CSS and template filter.
18 * @ingroup Skins
20 class SkinSimple extends SkinTemplate {
21 var $skinname = 'simple', $stylename = 'simple',
22 $template = 'MonoBookTemplate', $useHeadElement = true;
24 /**
25 * @param $out OutputPage
27 function setupSkinUserCss( OutputPage $out ) {
28 parent::setupSkinUserCss( $out );
30 $out->addModuleStyles( 'skins.simple' );
32 /* Add some userprefs specific CSS styling */
33 global $wgUser, $wgContLang;
34 $rules = array();
35 $underline = "";
37 if ( $wgUser->getOption( 'underline' ) < 2 ) {
38 $underline = "text-decoration: " . $wgUser->getOption( 'underline' ) ? 'underline' : 'none' . ";";
41 /* Also inherits from resourceloader */
42 if( !$wgUser->getOption( 'highlightbroken' ) ) {
43 $rules[] = "a.new, a.stub { color: inherit; text-decoration: inherit;}";
44 $rules[] = "a.new:after { color: #CC2200; $underline;}";
45 $rules[] = "a.stub:after { $underline; }";
47 $style = implode( "\n", $rules );
48 if ( $wgContLang->getDir() === 'rtl' ) {
49 $style = CSSJanus::transform( $style, true, false );
51 $out->addInlineStyle( $style );