X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=skins%2FModern.php;h=74f9b304f0665ad921ffcf71da488de04fc242af;hb=34e6fba175cc339856422e3bb5331e3251e0991c;hp=9349ec4c6a08e1f31591dafe3e9398f5bd372476;hpb=5f5463e8323d74cd0907fdf14f86570b527e9082;p=lhc%2Fweb%2Fwiklou.git diff --git a/skins/Modern.php b/skins/Modern.php index 9349ec4c6a..74f9b304f0 100644 --- a/skins/Modern.php +++ b/skins/Modern.php @@ -3,31 +3,39 @@ * Modern skin, derived from monobook template. * * @todo document - * @addtogroup Skins + * @file + * @ingroup Skins */ if( !defined( 'MEDIAWIKI' ) ) die( -1 ); +require( dirname(__FILE__) . '/MonoBook.php' ); + /** * Inherit main code from SkinTemplate, set the CSS and template filter. * @todo document - * @addtogroup Skins + * @ingroup Skins */ class SkinModern extends SkinTemplate { - function initPage( &$out ) { - SkinTemplate::initPage( $out ); - $this->skinname = 'modern'; - $this->stylename = 'modern'; - $this->template = 'ModernTemplate'; + var $skinname = 'modern', $stylename = 'modern', + $template = 'ModernTemplate', $useHeadElement = true; + + /** + * @param $out OutputPage + */ + function setupSkinUserCss( OutputPage $out ){ + parent::setupSkinUserCss( $out ); + $out->addModuleStyles ('skins.modern'); } } /** * @todo document - * @addtogroup Skins + * @ingroup Skins */ -class ModernTemplate extends QuickTemplate { +class ModernTemplate extends MonoBookTemplate { + /** * Template filter callback for Modern skin. * Takes an associative array of data set from a SkinTemplate-based @@ -37,76 +45,19 @@ class ModernTemplate extends QuickTemplate { * @access private */ function execute() { - global $wgUser; - $skin = $wgUser->getSkin(); - // 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') ?> - - data['printable']) ) { ?>media="print" href="text('stylepath') ?>/text('stylename') ?>/print.css?" /> - - - 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(); ?>
@@ -114,174 +65,87 @@ class ModernTemplate extends QuickTemplate { the content area without affecting the meaning of 'em' in #mw_content, which is used for the margins -->
- data['sitenotice']) { ?>
html('sitenotice') ?>
+
+ +
msg('tagline') ?>
+ data['newtalk'] ) { + ?>
html('newtalk') ?>
+ + data['sitenotice']) { + ?>
html('sitenotice') ?>
+ +
-

msg('tagline') ?>

-
html('subtitle') ?>
+
html('userlangattributes') ?>>html('subtitle') ?>
- data['undelete']) { ?>
html('undelete') ?>
- data['newtalk'] ) { ?>
html('newtalk') ?>
- data['showjumplinks']) { ?> + data['undelete']) { ?>
html('undelete') ?>
+ data['showjumplinks']) { ?> - html('bodytext') ?> - data['catlinks']) { ?> + html('bodytext') ?> +
+ data['catlinks']) { $this->html('catlinks'); } ?> + html ('dataAfterContent') ?>
-
- - - data['sidebar'] as $bar => $cont) { ?> -
tooltip('p-'.$bar) ?>> -
-
- -
-
- - - - - - -
-
msg('toolbox') ?>
-
- -
-
- - -data['language_urls'] ) { ?> -
-
msg('otherlanguages') ?>
-
-
    -data['language_urls'] as $langlink) { ?> -
  • - -
-
-
- + + renderPortals( $this->data['sidebar'] ); ?>
-
+
msg('personaltools') ?>
- -