X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=skins%2FMonoBook.php;h=594366b5a8cdd58b8e9e5cb93c79253c70e7a7b5;hb=1723b1d47169f67a2f08093e3380b86b5a30fe61;hp=5fb397f95e11718cd5d12a56d7c0232a4239c991;hpb=bcf096cfcc972476e1f4c2de577af4309a593db4;p=lhc%2Fweb%2Fwiklou.git diff --git a/skins/MonoBook.php b/skins/MonoBook.php index 5fb397f95e..594366b5a8 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -20,14 +20,24 @@ if( !defined( 'MEDIAWIKI' ) ) */ class SkinMonoBook extends SkinTemplate { /** Using monobook. */ - function initPage( &$out ) { - SkinTemplate::initPage( $out ); - $this->skinname = 'monobook'; - $this->stylename = 'monobook'; - $this->template = 'MonoBookTemplate'; - # Bug 14520: skins that just include this file shouldn't load nonexis- - # tent CSS fix files. - $this->cssfiles = array( 'IE', 'IE50', 'IE55', 'IE60', 'IE70', 'rtl' ); + var $skinname = 'monobook', $stylename = 'monobook', + $template = 'MonoBookTemplate', $useHeadElement = true; + + 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/IE60Fixes.css', 'screen', 'IE 6' ); + $out->addStyle( 'monobook/IE70Fixes.css', 'screen', 'IE 7' ); + $out->addStyle( 'monobook/rtl.css', 'screen', '', 'rtl' ); } } @@ -36,6 +46,7 @@ class SkinMonoBook extends SkinTemplate { * @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 @@ -45,98 +56,75 @@ class MonoBookTemplate extends QuickTemplate { * @access private */ function execute() { - global $wgUser; - $skin = $wgUser->getSkin(); + 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('printcss') ?>?" /> - cssfiles ) ) { ?> - cssfiles ) ) { ?> - cssfiles ) ) { ?> - cssfiles ) ) { ?> - - - 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') ?>"> -
-
-
- - data['sitenotice']) { ?>
html('sitenotice') ?>
-

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

-
-

msg('tagline') ?>

-
html('subtitle') ?>
- data['undelete']) { ?>
html('undelete') ?>
- data['newtalk'] ) { ?>
html('newtalk') ?>
- data['showjumplinks']) { ?> - - html('bodytext') ?> - data['catlinks']) { $this->html('catlinks'); } ?> - -
-
+ $this->html( 'headelement' ); +?>
+
html("specialpageattributes") ?>> + + data['sitenotice']) { ?>
html('sitenotice') ?>
+ +

html('title') ?>

+
+

msg('tagline') ?>

+
html('userlangattributes') ?>>html('subtitle') ?>
+data['undelete']) { ?> +
html('undelete') ?>
+data['newtalk'] ) { ?> +
html('newtalk') ?>
+data['showjumplinks']) { ?> + + + +html('bodytext') ?> + data['catlinks']) { $this->html('catlinks'); } ?> + + data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?> +
-
-
+
+
html('userlangattributes') ?>>
msg('views') ?>
-
msg('personaltools') ?>
-
- data['sidebar'] as $bar => $cont) { ?> -
tooltip('p-'.$bar) ?>> -
-
- -
-
- +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') ?>
@@ -186,23 +246,23 @@ class MonoBookTemplate extends QuickTemplate { if($this->data['notspecialpage']) { ?>
  • tooltipAndAccesskey('t-whatlinkshere') ?>>msg('whatlinkshere') ?>
  • + ?>"skin->tooltipAndAccesskey('t-whatlinkshere') ?>>msg('whatlinkshere') ?> data['nav_urls']['recentchangeslinked'] ) { ?>
  • tooltipAndAccesskey('t-recentchangeslinked') ?>>msg('recentchangeslinked') ?>
  • + ?>"skin->tooltipAndAccesskey('t-recentchangeslinked') ?>>msg('recentchangeslinked-toolbox') ?> data['nav_urls']['trackbacklink'])) { ?> + if( isset( $this->data['nav_urls']['trackbacklink'] ) && $this->data['nav_urls']['trackbacklink'] ) { ?> + ?>"skin->tooltipAndAccesskey('t-trackbacklink') ?>>msg('trackbacklink') ?> data['feeds']) { ?> data['nav_urls'][$special]) { ?>
  • tooltipAndAccesskey('t-'.$special) ?>>msg($special) ?>
  • + ?>"skin->tooltipAndAccesskey('t-'.$special) ?>>msg($special) ?> data['nav_urls']['print']['href'])) { ?>
  • tooltipAndAccesskey('t-print') ?>>msg('printableversion') ?>
  • " rel="alternate"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') ?>
    + html('userlangattributes') ?>>msg('otherlanguages') ?>
      data['language_urls'] as $langlink) { ?> @@ -245,45 +310,33 @@ class MonoBookTemplate extends QuickTemplate {
    - -
    -
    - -
    -html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?> -html('reporttime') ?> -data['debug'] ): ?> - - - +