X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=skins%2FModern.php;h=02e3b0af8cf91529e49fe2532ed34cebe7a7bac1;hb=2d106cb0503674570deb76cb8907dcedd8d2825c;hp=1b5e078907d72f8584013d6dff8785ab2e0d804d;hpb=c3374eb88004a101c8fd2f67798a65de03d28228;p=lhc%2Fweb%2Fwiklou.git diff --git a/skins/Modern.php b/skins/Modern.php index 1b5e078907..02e3b0af8c 100644 --- a/skins/Modern.php +++ b/skins/Modern.php @@ -10,34 +10,23 @@ if( !defined( 'MEDIAWIKI' ) ) die( -1 ); +require( dirname(__FILE__) . '/MonoBook.php' ); + /** * Inherit main code from SkinTemplate, set the CSS and template filter. * @todo document * @ingroup Skins */ class SkinModern extends SkinTemplate { - /* - * We don't like the default getPoweredBy, the icon clashes with the - * skin L&F. - */ - function getPoweredBy() { - global $wgVersion; - return "
Powered by MediaWiki $wgVersion
"; - } + var $skinname = 'modern', $stylename = 'modern', + $template = 'ModernTemplate', $useHeadElement = true; - function initPage( OutputPage $out ) { - parent::initPage( $out ); - $this->skinname = 'modern'; - $this->stylename = 'modern'; - $this->template = 'ModernTemplate'; - } - + /** + * @param $out OutputPage + */ function setupSkinUserCss( OutputPage $out ){ - // Do not call parent::setupSkinUserCss(), we have our own print style - $out->addStyle( 'common/shared.css', 'screen' ); - $out->addStyle( 'modern/main.css', 'screen' ); - $out->addStyle( 'modern/print.css', 'print' ); - $out->addStyle( 'modern/rtl.css', 'screen', '', 'rtl' ); + parent::setupSkinUserCss( $out ); + $out->addModuleStyles ('skins.modern'); } } @@ -45,7 +34,11 @@ class SkinModern extends SkinTemplate { * @todo document * @ingroup Skins */ -class ModernTemplate extends QuickTemplate { +class ModernTemplate extends MonoBookTemplate { + + /** + * @var Skin + */ var $skin; /** * Template filter callback for Modern skin. @@ -56,85 +49,21 @@ class ModernTemplate extends QuickTemplate { * @access private */ function execute() { - global $wgRequest; $this->skin = $skin = $this->data['skin']; - $action = $wgRequest->getText( 'action' ); // Suppress warnings to prevent notices about missing indexes in $this->data wfSuppressWarnings(); -?> -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') ?>" -data['body_onload' ]) { ?> onload="text('body_onload') ?>" - class="mediawiki text('dir') ?> text('pageclass') ?> text('skinnameclass') ?>"> + $this->html( 'headelement' ); +?> -

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

+

html('title') ?>

-
-
msg('views') ?>
- -
+cactions(); ?>
@@ -143,7 +72,7 @@ class ModernTemplate extends QuickTemplate { for the margins -->
- +
msg('tagline') ?>
data['newtalk'] ) { ?>
html('newtalk') ?>
@@ -153,12 +82,14 @@ class ModernTemplate extends QuickTemplate {
-
html('subtitle') ?>
+
html('userlangattributes') ?>>html('subtitle') ?>
data['undelete']) { ?>
html('undelete') ?>
data['showjumplinks']) { ?> html('bodytext') ?> + data['printfooter']) { ?>
html('printfooter'); ?>
+ html('debughtml'); ?>
data['catlinks']) { $this->html('catlinks'); } ?> html ('dataAfterContent') ?> @@ -166,27 +97,10 @@ class ModernTemplate extends QuickTemplate {
-
+
html("userlangattributes") ?>> - data['sidebar']; - if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true; - if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true; - if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true; - - foreach ($sidebar as $boxName => $cont) { - if ( $boxName == 'SEARCH' ) { - $this->searchBox(); - } elseif ( $boxName == 'TOOLBOX' ) { - $this->toolbox(); - } elseif ( $boxName == 'LANGUAGES' ) { - $this->languageBox(); - } else { - $this->customBox( $boxName, $cont ); - } - } - ?> + renderPortals( $this->data['sidebar'] ); ?>
@@ -200,171 +114,46 @@ class ModernTemplate extends QuickTemplate {
msg('personaltools') ?>
- -