X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=skins%2FMonoBook.php;h=2c02d684a04c481e60b2fe723ff23b56d4c8aa8b;hb=28fa2922fcfbb92dc5131fe4952a39eeda4c3e85;hp=4322e0dc74d441d9b3d936af96305d7c400c1aad;hpb=e326074edc76ac50567523a269bf8d008e199b9b;p=lhc%2Fweb%2Fwiklou.git diff --git a/skins/MonoBook.php b/skins/MonoBook.php index 4322e0dc74..2c02d684a0 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -6,38 +6,50 @@ * 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 ) { + global $wgHandheldStyle; + SkinTemplate::initPage( $out ); $this->skinname = 'monobook'; $this->stylename = 'monobook'; $this->template = 'MonoBookTemplate'; + + // Append to the default screen common & print styles... + $this->addStyle( 'monobook/main.css', 'screen' ); + if( $wgHandheldStyle ) { + // Currently in testing... try 'chick/main.css' + $this->addStyle( $wgHandheldStyle, 'handheld' ); + } + + $this->addStyle( 'monobook/IE50Fixes.css', 'screen', 'lt IE 5.5000' ); + $this->addStyle( 'monobook/IE55Fixes.css', 'screen', 'IE 5.5000' ); + $this->addStyle( 'monobook/IE60Fixes.css', 'screen', 'IE 6' ); + $this->addStyle( 'monobook/IE70Fixes.css', 'screen', 'IE 7' ); + + $this->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,49 +59,52 @@ 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') ?> <?php $this->text('pagetitle') ?> - - data['printable']) ) { ?>media="print" href="text('stylepath') ?>/common/commonPrint.css?" /> - - - - + html('csslinks') ?> + data ); ?> -data['jsvarurl' ]) { ?> - + +html('headscripts') ?> +data['jsvarurl']) { ?> + -data['pagecss' ]) { ?> - +data['pagecss']) { ?> + data['usercss' ]) { ?> - + if($this->data['usercss']) { ?> + data['userjs' ]) { ?> + if($this->data['userjs']) { ?> data['userjsprev']) { ?> data['trackbackhtml']) print $this->data['trackbackhtml']; ?> - - html('headscripts') ?> -data['body_ondblclick']) { ?>ondblclick="text('body_ondblclick') ?>" -data['body_onload' ]) { ?>onload="text('body_onload') ?>" - class="mediawiki text('nsclass') ?> text('dir') ?> text('pageclass') ?>"> +data['body_ondblclick']) { ?> ondblclick="text('body_ondblclick') ?>" +data['body_onload']) { ?> onload="text('body_onload') ?>" + class="mediawiki text('dir') ?> text('pageclass') ?> text('skinnameclass') ?>">
@@ -104,8 +119,9 @@ class MonoBookTemplate extends QuickTemplate { data['showjumplinks']) { ?> html('bodytext') ?> - data['catlinks']) { ?> + data['catlinks']) { $this->html('catlinks'); } ?> + data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?>
@@ -113,14 +129,31 @@ class MonoBookTemplate extends QuickTemplate {
msg('views') ?>
-
    -data['content_actions'] as $key => $tab) { ?> -
  • class="">
  • - -
+
msg('personaltools') ?>
@@ -129,7 +162,7 @@ class MonoBookTemplate extends QuickTemplate { data['personal_urls'] as $key => $item) { ?>
  • class="active">"tooltipAndAccesskey('pt-'.$key) ?> class="">
  • @@ -139,38 +172,89 @@ class MonoBookTemplate extends QuickTemplate {
    - 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') ?>
    @@ -179,53 +263,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') ?>
    @@ -237,47 +327,34 @@ class MonoBookTemplate extends QuickTemplate {
    - -
    -
    - - - html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?> - -html('reporttime') ?> -data['debug'] ): ?> - - - + + +