X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=skins%2FMonoBook.php;h=db77791260d84af917854b0d49be124ced4f81df;hb=00c399a1b0f96afe8e9fa4c15edf27301269cb89;hp=766a6f295ca92a56d9f441fa70bc17226465922d;hpb=051b1a9e1d03031516f4bdeb6ca7f5e84f8cd58f;p=lhc%2Fweb%2Fwiklou.git diff --git a/skins/MonoBook.php b/skins/MonoBook.php index 766a6f295c..db77791260 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -6,7 +6,8 @@ * dependency on PHPTAL. * * @todo document - * @addtogroup Skins + * @file + * @ingroup Skins */ if( !defined( 'MEDIAWIKI' ) ) @@ -15,23 +16,45 @@ if( !defined( 'MEDIAWIKI' ) ) /** * Inherit main code from SkinTemplate, set the CSS and template filter. * @todo document - * @addtogroup Skins + * @ingroup Skins */ class SkinMonoBook extends SkinTemplate { /** Using monobook. */ - function initPage( &$out ) { - SkinTemplate::initPage( $out ); + function initPage( OutputPage $out ) { + parent::initPage( $out ); $this->skinname = 'monobook'; $this->stylename = 'monobook'; $this->template = 'MonoBookTemplate'; + + } + + function setupSkinUserCss( OutputPage $out ) { + global $wgHandheldStyle; + + parent::setupSkinUserCss( $out ); + + // Append to the default screen common & print styles... + $out->addStyle( 'monobook/main.css', 'screen' ); + if( $wgHandheldStyle ) { + // Currently in testing... try 'chick/main.css' + $out->addStyle( $wgHandheldStyle, 'handheld' ); + } + + $out->addStyle( 'monobook/IE50Fixes.css', 'screen', 'lt IE 5.5000' ); + $out->addStyle( 'monobook/IE55Fixes.css', 'screen', 'IE 5.5000' ); + $out->addStyle( 'monobook/IE60Fixes.css', 'screen', 'IE 6' ); + $out->addStyle( 'monobook/IE70Fixes.css', 'screen', 'IE 7' ); + + $out->addStyle( 'monobook/rtl.css', 'screen', '', 'rtl' ); } } /** * @todo document - * @addtogroup Skins + * @ingroup Skins */ class MonoBookTemplate extends QuickTemplate { + var $skin; /** * Template filter callback for MonoBook skin. * Takes an associative array of data set from a SkinTemplate-based @@ -41,8 +64,9 @@ class MonoBookTemplate extends QuickTemplate { * @access private */ function execute() { - global $wgUser; - $skin = $wgUser->getSkin(); + global $wgRequest; + $this->skin = $skin = $this->data['skin']; + $action = $wgRequest->getText( 'action' ); // Suppress warnings to prevent notices about missing indexes in $this->data wfSuppressWarnings(); @@ -56,44 +80,36 @@ class MonoBookTemplate extends QuickTemplate { html('headlinks') ?>