X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=skins%2FMonoBook.php;h=db77791260d84af917854b0d49be124ced4f81df;hb=1d3b95ab8d483db31e84253d90808819ecb3c1ab;hp=d8447fd7f273c2b61501d161919aa93b9d77e473;hpb=0c340931af7d41e6f1515188712ca71ce44108f1;p=lhc%2Fweb%2Fwiklou.git diff --git a/skins/MonoBook.php b/skins/MonoBook.php index d8447fd7f2..db77791260 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -6,38 +6,55 @@ * dependency on PHPTAL. * * @todo document - * @package MediaWiki - * @subpackage Skins + * @file + * @ingroup Skins */ if( !defined( 'MEDIAWIKI' ) ) die( -1 ); -/** */ -require_once('includes/SkinTemplate.php'); - /** * Inherit main code from SkinTemplate, set the CSS and template filter. * @todo document - * @package MediaWiki - * @subpackage 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 - * @package MediaWiki - * @subpackage 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 @@ -47,35 +64,42 @@ class MonoBookTemplate 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') ?> - html('headscripts') ?> <?php $this->text('pagetitle') ?> - - data['printable']) ) { ?>media="print" href="text('stylepath') ?>/common/commonPrint.css" /> - - - - - -data['jsvarurl' ]) { ?> - + + data ); ?> + + + +html('headscripts') ?> +data['jsvarurl']) { ?> + - -data['pagecss' ]) { ?> - +data['pagecss']) { ?> + data['usercss' ]) { ?> - + if($this->data['usercss']) { ?> + data['userjs' ]) { ?> + if($this->data['userjs']) { ?> data['userjsprev']) { ?> @@ -83,15 +107,15 @@ class MonoBookTemplate extends QuickTemplate { data['trackbackhtml']) print $this->data['trackbackhtml']; ?> -data['body_ondblclick']) { ?>ondblclick="text('body_ondblclick') ?>" -data['body_onload' ]) { ?>onload="text('body_onload') ?>" -data['nsclass' ]) { ?>class="text('nsclass') ?>"> +data['body_ondblclick']) { ?> ondblclick="text('body_ondblclick') ?>" +data['body_onload']) { ?> onload="text('body_onload') ?>" + class="mediawiki text('dir') ?> text('pageclass') ?> text('skinnameclass') ?>">
data['sitenotice']) { ?>
html('sitenotice') ?>
-

text('title') ?>

+

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

msg('tagline') ?>

html('subtitle') ?>
@@ -100,8 +124,9 @@ class MonoBookTemplate extends QuickTemplate { data['showjumplinks']) { ?> html('bodytext') ?> - data['catlinks']) { ?> + data['catlinks']) { $this->html('catlinks'); } ?> + data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?>
@@ -109,23 +134,40 @@ class MonoBookTemplate extends QuickTemplate {
msg('views') ?>
-
    -data['content_actions'] as $key => $tab) { ?> -
  • class="">
  • - -
+
msg('personaltools') ?>
- data['sidebar'] as $bar => $cont) { ?> -
-
-
-
    - $val) { ?> -
  • class="active" >
  • - +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 ); + } + } +?> +
+
+ -
- +
+html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?> +html('reporttime') ?> +data['debug'] ): ?> + + + + +
msg('toolbox') ?>
@@ -175,53 +268,59 @@ class MonoBookTemplate extends QuickTemplate { if($this->data['notspecialpage']) { ?>
  • msg('whatlinkshere') ?>
  • + ?>"skin->tooltipAndAccesskey('t-whatlinkshere') ?>>msg('whatlinkshere') ?> data['nav_urls']['recentchangeslinked'] ) { ?>
  • msg('recentchangeslinked') ?>
  • + ?>"skin->tooltipAndAccesskey('t-recentchangeslinked') ?>>msg('recentchangeslinked') ?> data['nav_urls']['trackbacklink'])) { ?> + ?>"skin->tooltipAndAccesskey('t-trackbacklink') ?>>msg('trackbacklink') ?> data['feeds']) { ?> data['nav_urls'][$special]) { ?>
  • msg($special) ?>
  • + ?>"skin->tooltipAndAccesskey('t-'.$special) ?>>msg($special) ?> data['nav_urls']['print']['href'])) { ?>
  • msg('printableversion') ?>
  • "skin->tooltipAndAccesskey('t-print') ?>>msg('printableversion') ?>data['nav_urls']['permalink']['href'])) { ?> "skin->tooltipAndAccesskey('t-permalink') ?>>msg('permalink') ?>data['nav_urls']['permalink']['href'] === '') { ?> - skin->tooltip('t-ispermalink') ?>>msg('permalink') ?>
    data['language_urls'] ) { ?> + } + + /*************************************************************************************************/ + function languageBox() { + if( $this->data['language_urls'] ) { +?>
    msg('otherlanguages') ?>
    @@ -233,41 +332,34 @@ class MonoBookTemplate extends QuickTemplate {
    - -
    -
    - - -
    -html('reporttime') ?> - - +
    + +