X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=skins%2FModern.php;h=ebd574f435fe7b9f9e0b8a4cb84970207644c5cc;hb=5343b3eb3e4e11634be5e161120d879cd80bf70c;hp=e09db651421b92612915702150e418c38f98e82d;hpb=7dfa83d291d27697560686f4788233299f5939ca;p=lhc%2Fweb%2Fwiklou.git diff --git a/skins/Modern.php b/skins/Modern.php index e09db65142..ebd574f435 100644 --- a/skins/Modern.php +++ b/skins/Modern.php @@ -10,30 +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( &$out ) { - Skin::initPage( $out ); - $this->skinname = 'modern'; - $this->stylename = 'modern'; - $this->template = 'ModernTemplate'; - - $this->addStyle( 'common/shared.css', 'screen' ); - $this->addStyle( 'modern/main.css', 'screen' ); - $this->addStyle( 'modern/print.css', 'print' ); + /** + * @param $out OutputPage + */ + function setupSkinUserCss( OutputPage $out ){ + parent::setupSkinUserCss( $out ); + $out->addModuleStyles ('skins.modern'); } } @@ -41,8 +34,8 @@ class SkinModern extends SkinTemplate { * @todo document * @ingroup Skins */ -class ModernTemplate extends QuickTemplate { - var $skin; +class ModernTemplate extends MonoBookTemplate { + /** * Template filter callback for Modern skin. * Takes an associative array of data set from a SkinTemplate-based @@ -52,87 +45,19 @@ 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('nsclass') ?> text('dir') ?> text('pageclass') ?>"> + $this->html( 'headelement' ); +?> -
-

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

-
+

html('title') ?>

-
-
msg('views') ?>
- -
+cactions(); ?>
@@ -141,6 +66,7 @@ class ModernTemplate extends QuickTemplate { for the margins -->
+
msg('tagline') ?>
data['newtalk'] ) { ?>
html('newtalk') ?>
@@ -150,7 +76,7 @@ class ModernTemplate extends QuickTemplate {
-
html('subtitle') ?>
+
html('userlangattributes') ?>>html('subtitle') ?>
data['undelete']) { ?>
html('undelete') ?>
data['showjumplinks']) { ?> @@ -158,31 +84,15 @@ class ModernTemplate extends QuickTemplate { html('bodytext') ?>
data['catlinks']) { $this->html('catlinks'); } ?> + html ('dataAfterContent') ?>
-
+
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'] ); ?>
@@ -196,171 +106,46 @@ class ModernTemplate extends QuickTemplate {
msg('personaltools') ?>
- -