X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=skins%2FMonoBook.php;h=c12bea604c237d97efba7b0e9024eff734436a01;hb=1b70ac7ff7b1b770d39242af5cba5c04a8b641fe;hp=f4724e4308df0873a8031e21cf6533c6c4ae0395;hpb=35383a74e32068f624e44ee60f22f94b7db56e25;p=lhc%2Fweb%2Fwiklou.git diff --git a/skins/MonoBook.php b/skins/MonoBook.php index f4724e4308..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 ); } } @@ -64,58 +82,31 @@ class MonoBookTemplate extends QuickTemplate { * @access private */ function execute() { - global $wgRequest; + global $wgRequest, $wgOut, $wgStyleVersion, $wgJsMimeType, $wgStylePath; $this->skin = $skin = $this->data['skin']; $action = $wgRequest->getText( 'action' ); // Suppress warnings to prevent notices about missing indexes in $this->data wfSuppressWarnings(); + # FIXME: What is this? Should it apply to all skins? + $path = htmlspecialchars( $wgStylePath ); + $wgOut->addScript( << + +HTML + ); -?> -data['xhtmlnamespaces'] as $tag => $ns) { - ?>xmlns:xml:lang="text('lang') ?>" lang="text('lang') ?>" dir="text('dir') ?>"> - - - html('headlinks') ?> - <?php $this->text('pagetitle') ?> - html('csslinks') ?> - - - - data ); ?> - - - -html('headscripts') ?> -data['jsvarurl']) { ?> - - -data['pagecss']) { ?> - -data['usercss']) { ?> - -data['userjs']) { ?> - -data['userjsprev']) { ?> - -data['trackbackhtml']) print $this->data['trackbackhtml']; ?> - -data['body_ondblclick']) { ?> ondblclick="text('body_ondblclick') ?>" + echo $wgOut->headElement( $this->skin ); + +?>data['body_ondblclick']) { ?> ondblclick="text('body_ondblclick') ?>" data['body_onload']) { ?> onload="text('body_onload') ?>" - class="mediawiki text('dir') ?> text('pageclass') ?> text('skinnameclass') ?>"> + class="mediawiki text('dir'); $this->text('capitalizeallnouns') ?> text('pageclass') ?> text('skinnameclass') ?>">
- + data['sitenotice']) { ?>
html('sitenotice') ?>
-

data['displaytitle']!=""?$this->html('title'):$this->text('title') ?>

+

html('title') ?>

msg('tagline') ?>

html('subtitle') ?>
@@ -135,14 +126,14 @@ class MonoBookTemplate extends QuickTemplate {
msg('views') ?>
-