X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=skins%2FMonoBook.php;h=c12bea604c237d97efba7b0e9024eff734436a01;hb=1b70ac7ff7b1b770d39242af5cba5c04a8b641fe;hp=ad859a09ea7d1401eafd2ab513db30f8cdbbf1fa;hpb=7dccaf159b2fd18b2761b1fd48b6b17ac5888072;p=lhc%2Fweb%2Fwiklou.git diff --git a/skins/MonoBook.php b/skins/MonoBook.php index ad859a09ea..c12bea604c 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -20,13 +20,8 @@ if( !defined( 'MEDIAWIKI' ) ) */ class SkinMonoBook extends SkinTemplate { /** Using monobook. */ - function initPage( OutputPage $out ) { - parent::initPage( $out ); - $this->skinname = 'monobook'; - $this->stylename = 'monobook'; - $this->template = 'MonoBookTemplate'; - - } + var $skinname = 'monobook', $stylename = 'monobook', + $template = 'MonoBookTemplate'; function setupSkinUserCss( OutputPage $out ) { global $wgHandheldStyle; @@ -46,6 +41,29 @@ class SkinMonoBook extends SkinTemplate { $out->addStyle( 'monobook/IE70Fixes.css', 'screen', 'IE 7' ); $out->addStyle( 'monobook/rtl.css', 'screen', '', 'rtl' ); + + + //@@todo we can move this to the parent once we update all skins + if( isset( $this->pagecss ) && $this->pagecss) + $out->addInlineStyle( $this->pagecss ); + + if( isset( $this->usercss ) && $this->usercss) + $out->addInlineStyle( $this->usercss ); + + } + function setupSkinUserJs( OutputPage $out ) { + parent::setupSkinUserJs( $out ); + $out->addScriptFile( 'wikibits.js' ); + + //@@todo can move to parent once we update all skins (to not include things twice + if( isset( $this->jsvarurl ) && $this->jsvarurl) + $out->addScriptFile( $this->jsvarurl ); + + if( isset( $this->userjs ) && $this->userjs) + $out->addScriptFile( $this->userjs ); + + if( isset( $this->userjsprev ) && $this->userjsprev) + $out->addInlineScript( $this->userjsprev ); } } @@ -70,9 +88,8 @@ class MonoBookTemplate extends QuickTemplate { // Suppress warnings to prevent notices about missing indexes in $this->data wfSuppressWarnings(); - - $path = htmlspecialchars( $wgStylePath ); # FIXME: What is this? Should it apply to all skins? + $path = htmlspecialchars( $wgStylePath ); $wgOut->addScript( << @@ -87,7 +104,7 @@ HTML