var $skinname = 'monobook', $stylename = 'monobook',
$template = 'MonoBookTemplate', $useHeadElement = true;
+ /**
+ * @param $out OutputPage
+ */
function setupSkinUserCss( OutputPage $out ) {
global $wgHandheldStyle;
parent::setupSkinUserCss( $out );
* @ingroup Skins
*/
class MonoBookTemplate extends BaseTemplate {
+
+ /**
+ * @var Skin
+ */
var $skin;
+
/**
* Template filter callback for MonoBook skin.
* Takes an associative array of data set from a SkinTemplate-based
<?php } ?>
<!-- start content -->
<?php $this->html('bodytext') ?>
+ <?php if($this->data['printfooter']) { ?><div class="printfooter"><?php $this->html('printfooter'); ?></div><?php } ?>
+ <?php $this->html('debughtml'); ?>
<?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
<!-- end content -->
<?php if($this->data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?>
</div>
<div class="portlet" id="p-logo">
<?php
- $logoAttribs = array() + $skin->tooltipAndAccesskeyAttribs('p-logo');
+ $logoAttribs = array() + Linker::tooltipAndAccesskeyAttribs('p-logo');
$logoAttribs['style'] = "background-image: url({$this->data['logopath']});";
$logoAttribs['href'] = $this->data['nav_urls']['mainpage']['href'];
echo Html::element( 'a', $logoAttribs );
?>
</div><!-- end of the left (by default at least) column -->
<div class="visualClear"></div>
+<?php
+ $validFooterIcons = $this->getFooterIcons( "icononly" );
+ $validFooterLinks = $this->getFooterLinks( "flat" ); // Additional footer links
+
+ if ( count( $validFooterIcons ) + count( $validFooterLinks ) > 0 ) { ?>
<div id="footer"<?php $this->html('userlangattributes') ?>>
-<?php foreach ( $this->getFooterIcons("icononly") as $blockName => $footerIcons ) { ?>
+<?php
+ $footerEnd = '</div>';
+ } else {
+ $footerEnd = '';
+ }
+ foreach ( $validFooterIcons as $blockName => $footerIcons ) { ?>
<div id="f-<?php echo htmlspecialchars($blockName); ?>ico">
<?php foreach ( $footerIcons as $icon ) { ?>
<?php echo $this->skin->makeFooterIcon( $icon ); ?>
</div>
<?php }
- // Generate additional footer links
- $validFooterLinks = $this->getFooterLinks("flat");
if ( count( $validFooterLinks ) > 0 ) {
?> <ul id="f-list">
<?php
foreach( $validFooterLinks as $aLink ) { ?>
<li id="<?php echo $aLink ?>"><?php $this->html($aLink) ?></li>
-
<?php
}
?>
</ul>
<?php }
+echo $footerEnd;
?>
-</div>
+
</div>
<?php
$this->printTrail();
/**
* Prints the cactions bar.
* Shared between MonoBook and Modern
+ *
+ * @param $skin Skin
*/
function cactions( Skin $skin ) {
?>
$linkAttribs = array( 'href' => $tab['href'] );
if( isset( $tab["tooltiponly"] ) && $tab["tooltiponly"] ) {
- $title = $skin->titleAttrib( "ca-$key" );
+ $title = Linker::titleAttrib( "ca-$key" );
if ( $title !== false ) {
$linkAttribs['title'] = $title;
}
} else {
- $linkAttribs += $skin->tooltipAndAccesskeyAttribs( "ca-$key" );
+ $linkAttribs += Linker::tooltipAndAccesskeyAttribs( "ca-$key" );
}
$linkHtml = Html::element( 'a', $linkAttribs, $tab['text'] );
/*************************************************************************************************/
function customBox( $bar, $cont ) {
$portletAttribs = array( 'class' => 'generated-sidebar portlet', 'id' => Sanitizer::escapeId( "p-$bar" ) );
- $tooltip = $this->skin->titleAttrib( "p-$bar" );
+ $tooltip = Linker::titleAttrib( "p-$bar" );
if ( $tooltip !== false ) {
$portletAttribs['title'] = $tooltip;
}
echo ' ' . Html::openElement( 'div', $portletAttribs );
?>
- <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo htmlspecialchars($bar); else echo htmlspecialchars($out); ?></h5>
+ <h5><?php $msg = wfMessage( $bar ); echo htmlspecialchars( $msg->exists() ? $msg->text() : $bar ); ?></h5>
<div class='pBody'>
<?php if ( is_array( $cont ) ) { ?>
<ul>