r96217 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96216‎ | r96217 | r96218 >
Date:12:38, 4 September 2011
Author:dantman
Status:resolved
Tags:
Comment:
Followup r87340: Post-hook swap bodytext into a new bodycontent key and append printfooter and debughtml to bodytext so that we get the same behaviour as before for skins, the advantage of letting extensions modify them separately, and let skins opt-in to the ability to display these separately.
Modified paths:
  • /trunk/phase3/includes/SkinLegacy.php (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)
  • /trunk/phase3/skins/Modern.php (modified) (history)
  • /trunk/phase3/skins/MonoBook.php (modified) (history)
  • /trunk/phase3/skins/Vector.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/Vector.php
@@ -174,9 +174,9 @@
175175 </div>
176176 <!-- /jumpto -->
177177 <?php endif; ?>
178 - <!-- bodytext -->
179 - <?php $this->html( 'bodytext' ) ?>
180 - <!-- /bodytext -->
 178+ <!-- bodycontent -->
 179+ <?php $this->html( 'bodycontent' ) ?>
 180+ <!-- /bodycontent -->
181181 <?php if ( $this->data['printfooter'] ): ?>
182182 <!-- printfooter -->
183183 <div class="printfooter">
Index: trunk/phase3/skins/MonoBook.php
@@ -91,8 +91,6 @@
9292 <?php } ?>
9393 <!-- start content -->
9494 <?php $this->html('bodytext') ?>
95 - <?php if($this->data['printfooter']) { ?><div class="printfooter"><?php $this->html('printfooter'); ?></div><?php } ?>
96 - <?php $this->html('debughtml'); ?>
9795 <?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
9896 <!-- end content -->
9997 <?php if($this->data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?>
Index: trunk/phase3/skins/Modern.php
@@ -88,8 +88,6 @@
8989 <?php if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#mw_portlets"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?>
9090
9191 <?php $this->html('bodytext') ?>
92 - <?php if($this->data['printfooter']) { ?><div class="printfooter"><?php $this->html('printfooter'); ?></div><?php } ?>
93 - <?php $this->html('debughtml'); ?>
9492 <div class='mw_clear'></div>
9593 <?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
9694 <?php $this->html ('dataAfterContent') ?>
Index: trunk/phase3/includes/SkinLegacy.php
@@ -74,10 +74,6 @@
7575 $this->html( 'headelement' );
7676 echo $this->beforeContent();
7777 $this->html( 'bodytext' );
78 - echo '<div class="printfooter">';
79 - $this->html( 'printfooter' );
80 - echo '</div>';
81 - $this->html( 'debughtml' );
8278 echo "\n";
8379 echo $this->afterContent();
8480 $this->html( 'dataAfterContent' );
Index: trunk/phase3/includes/SkinTemplate.php
@@ -483,6 +483,15 @@
484484 wfDebug( __METHOD__ . ": Hook SkinTemplateOutputPageBeforeExec broke outputPage execution!\n" );
485485 }
486486
 487+ // Set the bodytext to another key so that skins can just output it on it's own
 488+ // and output printfooter and debughtml separately
 489+ $tpl->set( 'bodycontent', $tpl->data['bodytext'] );
 490+
 491+ // Append printfooter and debughtml onto bodytext so that skins that were already
 492+ // using bodytext before they were split out don't suddenly start not outputting information
 493+ $tpl->data['bodytext'] .= Html::element( 'div', array( 'class' => 'printfooter' ), "\n{$tpl->data['printfooter']}" ) . "\n";
 494+ $tpl->data['bodytext'] .= $tpl->data['debughtml'];
 495+
487496 // allow extensions adding stuff after the page content.
488497 // See Skin::afterContentHook() for further documentation.
489498 $tpl->set( 'dataAfterContent', $this->afterContentHook() );

Follow-up revisions

RevisionCommit summaryAuthorDate
r96218Followup r96217: Update Daddio.dantman13:03, 4 September 2011
r96393Followup r96217, slight regression use rawElement not element, accidentally c...dantman01:12, 7 September 2011
r965111.18: MFT r96163, r96174, r96212, r96217, r96218, r96271, r96273, r96306, r96...catrope22:07, 7 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r87340Moved "printfooter" and debug HTML away from "bodytext" so that they can be e...ialex17:23, 3 May 2011

Status & tagging log