* Added blank special page Special:BlankPage for benchmarking, etc.
* Foreign repo file descriptions and thumbnails are now cached.
* (bug 11732) Allow localisation of edit button images
-
+* Allow the search box, toolbox and languages box in the Monobook sidebar to be
+ moved around arbitrarily using special sections in [[MediaWiki:Sidebar]]:
+ SEARCH, TOOLBOX and LANGUAGES
+
+
=== Bug fixes in 1.13 ===
* (bug 10677) Add link to the file description page on the shared repository
continue;
if (strpos($line, '**') !== 0) {
$line = trim($line, '* ');
- $heading = $line;
+ if ( $line == 'SEARCH' || $line == 'TOOLBOX' || $line == 'LANGUAGES' ) {
+ # Special box type
+ $bar[$line] = array();
+ } else {
+ $heading = $line;
+ }
} else {
if (strpos($line, '|') !== false) { // sanity check
$line = array_map('trim', explode( '|' , trim($line, '* '), 2 ) );
# Use the first heading from the Monobook sidebar as the "browse" section
$bar = $this->buildSidebar();
+ unset( $bar['SEARCH'] );
+ unset( $bar['LANGUAGES'] );
+ unset( $bar['TOOLBOX'] );
$browseLinks = reset( $bar );
foreach ( $browseLinks as $link ) {
* @ingroup Skins
*/
class ModernTemplate extends QuickTemplate {
+ var $skin;
/**
* Template filter callback for Modern skin.
* Takes an associative array of data set from a SkinTemplate-based
*/
function execute() {
global $wgUser;
- $skin = $wgUser->getSkin();
+ $this->skin = $skin = $wgUser->getSkin();
// Suppress warnings to prevent notices about missing indexes in $this->data
wfSuppressWarnings();
<div id="mw_portlets">
- <!-- other portlets -->
- <?php foreach ($this->data['sidebar'] as $bar => $cont) { ?>
- <div class='generated-sidebar portlet' id='p-<?php echo Sanitizer::escapeId($bar) ?>'<?php echo $skin->tooltip('p-'.$bar) ?>>
- <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5>
- <div class='pBody'>
-<?php if ( is_array( $cont ) ) { ?>
+ <!-- portlets -->
+ <?php
+ $sidebar = $this->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 );
+ }
+ }
+ ?>
+
+ </div><!-- mw_portlets -->
+
+
+ </div><!-- main -->
+
+ <div class="mw_clear"></div>
+
+ <!-- personal portlet -->
+ <div class="portlet" id="p-personal">
+ <h5><?php $this->msg('personaltools') ?></h5>
+ <div class="pBody">
<ul>
-<?php foreach($cont as $key => $val) { ?>
- <li id="<?php echo Sanitizer::escapeId($val['id']) ?>"<?php
- if ( $val['active'] ) { ?> class="active" <?php }
- ?>><a href="<?php echo htmlspecialchars($val['href']) ?>"<?php echo $skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li>
+<?php foreach($this->data['personal_urls'] as $key => $item) { ?>
+ <li id="pt-<?php echo Sanitizer::escapeId($key) ?>"<?php
+ if ($item['active']) { ?> class="active"<?php } ?>><a href="<?php
+ echo htmlspecialchars($item['href']) ?>"<?php echo $skin->tooltipAndAccesskey('pt-'.$key) ?><?php
+ if(!empty($item['class'])) { ?> class="<?php
+ echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php
+ echo htmlspecialchars($item['text']) ?></a></li>
<?php } ?>
</ul>
-<?php } else {
- # allow raw HTML block to be defined by extensions
- print $cont;
- }
+ </div>
+ </div>
+
+
+ <!-- footer -->
+ <div id="footer">
+ <ul id="f-list">
+<?php
+ $footerlinks = array(
+ 'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright',
+ 'privacy', 'about', 'disclaimer', 'tagline',
+ );
+ foreach( $footerlinks as $aLink ) {
+ if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
+?> <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li>
+<?php }
+ }
?>
- </div><!-- pBody -->
- </div><!-- portlet -->
- <?php } ?>
+ </ul>
+ <?php echo $this->html("poweredbyico"); ?>
+ </div>
+ <?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>
+<?php $this->html('reporttime') ?>
+<?php if ( $this->data['debug'] ): ?>
+<!-- Debug output:
+<?php $this->text( 'debug' ); ?>
+-->
+<?php endif; ?>
+</body></html>
+<?php
+ wfRestoreWarnings();
+ } // end of execute() method
+
+ /*************************************************************************************************/
+ function searchBox() {
+?>
<!-- search -->
<div id="p-search" class="portlet">
<h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
<div id="searchBody" class="pBody">
<form action="<?php $this->text('searchaction') ?>" id="searchform"><div>
- <input id="searchInput" name="search" type="text"<?php echo $skin->tooltipAndAccesskey('search');
+ <input id="searchInput" name="search" type="text"<?php echo $this->skin->tooltipAndAccesskey('search');
if( isset( $this->data['search'] ) ) {
?> value="<?php $this->text('search') ?>"<?php } ?> />
- <input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('searcharticle') ?>"<?php echo $skin->tooltipAndAccesskey( 'search-go' ); ?> />
- <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>"<?php echo $skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />
+ <input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('searcharticle') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-go' ); ?> />
+ <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />
</div></form>
</div><!-- pBody -->
</div><!-- portlet -->
+<?php
+ }
+ /*************************************************************************************************/
+ function toolbox() {
+?>
<!-- toolbox -->
<div class="portlet" id="p-tb">
<h5><?php $this->msg('toolbox') ?></h5>
if($this->data['notspecialpage']) { ?>
<li id="t-whatlinkshere"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href'])
- ?>"<?php echo $skin->tooltipAndAccesskey('t-whatlinkshere') ?>><?php $this->msg('whatlinkshere') ?></a></li>
+ ?>"<?php echo $this->skin->tooltipAndAccesskey('t-whatlinkshere') ?>><?php $this->msg('whatlinkshere') ?></a></li>
<?php
if( $this->data['nav_urls']['recentchangeslinked'] ) { ?>
<li id="t-recentchangeslinked"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href'])
- ?>"<?php echo $skin->tooltipAndAccesskey('t-recentchangeslinked') ?>><?php $this->msg('recentchangeslinked') ?></a></li>
+ ?>"<?php echo $this->skin->tooltipAndAccesskey('t-recentchangeslinked') ?>><?php $this->msg('recentchangeslinked') ?></a></li>
<?php }
}
if(isset($this->data['nav_urls']['trackbacklink'])) { ?>
<li id="t-trackbacklink"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href'])
- ?>"<?php echo $skin->tooltipAndAccesskey('t-trackbacklink') ?>><?php $this->msg('trackbacklink') ?></a></li>
+ ?>"<?php echo $this->skin->tooltipAndAccesskey('t-trackbacklink') ?>><?php $this->msg('trackbacklink') ?></a></li>
<?php }
if($this->data['feeds']) { ?>
<li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) {
?><span id="feed-<?php echo Sanitizer::escapeId($key) ?>"><a href="<?php
- echo htmlspecialchars($feed['href']) ?>"<?php echo $skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a> </span>
+ echo htmlspecialchars($feed['href']) ?>"<?php echo $this->skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a> </span>
<?php } ?></li><?php
}
if($this->data['nav_urls'][$special]) {
?><li id="t-<?php echo $special ?>"><a href="<?php echo htmlspecialchars($this->data['nav_urls'][$special]['href'])
- ?>"<?php echo $skin->tooltipAndAccesskey('t-'.$special) ?>><?php $this->msg($special) ?></a></li>
+ ?>"<?php echo $this->skin->tooltipAndAccesskey('t-'.$special) ?>><?php $this->msg($special) ?></a></li>
<?php }
}
if(!empty($this->data['nav_urls']['print']['href'])) { ?>
<li id="t-print"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['print']['href'])
- ?>"<?php echo $skin->tooltipAndAccesskey('t-print') ?>><?php $this->msg('printableversion') ?></a></li><?php
+ ?>"<?php echo $this->skin->tooltipAndAccesskey('t-print') ?>><?php $this->msg('printableversion') ?></a></li><?php
}
if(!empty($this->data['nav_urls']['permalink']['href'])) { ?>
<li id="t-permalink"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['permalink']['href'])
- ?>"<?php echo $skin->tooltipAndAccesskey('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php
+ ?>"<?php echo $this->skin->tooltipAndAccesskey('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php
} elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?>
- <li id="t-ispermalink"<?php echo $skin->tooltip('t-ispermalink') ?>><?php $this->msg('permalink') ?></li><?php
+ <li id="t-ispermalink"<?php echo $this->skin->tooltip('t-ispermalink') ?>><?php $this->msg('permalink') ?></li><?php
}
wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) );
?> </ul>
</div><!-- pBody -->
</div><!-- portlet -->
+<?php
+ }
+ /*************************************************************************************************/
+ function languageBox() {
+?>
<!-- languages -->
<?php
if( $this->data['language_urls'] ) { ?>
</ul>
</div><!-- pBody -->
</div><!-- portlet -->
-<?php } ?>
-
- </div><!-- mw_portlets -->
-
-
- </div><!-- main -->
-
- <div class="mw_clear"></div>
+<?php
+ }
+ }
- <!-- personal portlet -->
- <div class="portlet" id="p-personal">
- <h5><?php $this->msg('personaltools') ?></h5>
- <div class="pBody">
+ /*************************************************************************************************/
+ function customBox( $bar, $cont ) {
+?>
+ <div class='generated-sidebar portlet' id='p-<?php echo Sanitizer::escapeId($bar) ?>'<?php echo $this->skin->tooltip('p-'.$bar) ?>>
+ <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5>
+ <div class='pBody'>
+<?php if ( is_array( $cont ) ) { ?>
<ul>
-<?php foreach($this->data['personal_urls'] as $key => $item) { ?>
- <li id="pt-<?php echo Sanitizer::escapeId($key) ?>"<?php
- if ($item['active']) { ?> class="active"<?php } ?>><a href="<?php
- echo htmlspecialchars($item['href']) ?>"<?php echo $skin->tooltipAndAccesskey('pt-'.$key) ?><?php
- if(!empty($item['class'])) { ?> class="<?php
- echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php
- echo htmlspecialchars($item['text']) ?></a></li>
+<?php foreach($cont as $key => $val) { ?>
+ <li id="<?php echo Sanitizer::escapeId($val['id']) ?>"<?php
+ if ( $val['active'] ) { ?> class="active" <?php }
+ ?>><a href="<?php echo htmlspecialchars($val['href']) ?>"<?php echo $this->skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li>
<?php } ?>
</ul>
- </div>
- </div>
-
-
- <!-- footer -->
- <div id="footer">
- <ul id="f-list">
-<?php
- $footerlinks = array(
- 'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright',
- 'privacy', 'about', 'disclaimer', 'tagline',
- );
- foreach( $footerlinks as $aLink ) {
- if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
-?> <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li>
-<?php }
- }
+<?php } else {
+ # allow raw HTML block to be defined by extensions
+ print $cont;
+ }
?>
- </ul>
- <?php echo $this->html("poweredbyico"); ?>
- </div>
-
- <?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>
-<?php $this->html('reporttime') ?>
-<?php if ( $this->data['debug'] ): ?>
-<!-- Debug output:
-<?php $this->text( 'debug' ); ?>
--->
-<?php endif; ?>
-</body></html>
+ </div><!-- pBody -->
+ </div><!-- portlet -->
<?php
- wfRestoreWarnings();
- } // end of execute() method
+ }
+
} // end of class
?>
* @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
*/
function execute() {
global $wgUser;
- $skin = $wgUser->getSkin();
+ $this->skin = $skin = $wgUser->getSkin();
// Suppress warnings to prevent notices about missing indexes in $this->data
wfSuppressWarnings();
echo $skin->tooltipAndAccesskey('n-mainpage') ?>></a>
</div>
<script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script>
- <?php foreach ($this->data['sidebar'] as $bar => $cont) { ?>
- <div class='generated-sidebar portlet' id='p-<?php echo Sanitizer::escapeId($bar) ?>'<?php echo $skin->tooltip('p-'.$bar) ?>>
- <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5>
- <div class='pBody'>
-<?php if ( is_array( $cont ) ) { ?>
- <ul>
-<?php foreach($cont as $key => $val) { ?>
- <li id="<?php echo Sanitizer::escapeId($val['id']) ?>"<?php
- if ( $val['active'] ) { ?> class="active" <?php }
- ?>><a href="<?php echo htmlspecialchars($val['href']) ?>"<?php echo $skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li>
-<?php } ?>
- </ul>
-<?php } else {
- # allow raw HTML block to be defined by extensions
- print $cont;
- }
+<?php
+ $sidebar = $this->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 );
+ }
+ }
+?>
+ </div><!-- end of the left (by default at least) column -->
+ <div class="visualClear"></div>
+ <div id="footer">
+<?php
+ if($this->data['poweredbyico']) { ?>
+ <div id="f-poweredbyico"><?php $this->html('poweredbyico') ?></div>
+<?php }
+ if($this->data['copyrightico']) { ?>
+ <div id="f-copyrightico"><?php $this->html('copyrightico') ?></div>
+<?php }
+
+ // Generate additional footer links
+?>
+ <ul id="f-list">
+<?php
+ $footerlinks = array(
+ 'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright',
+ 'privacy', 'about', 'disclaimer', 'tagline',
+ );
+ foreach( $footerlinks as $aLink ) {
+ if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
+?> <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li>
+<?php }
+ }
?>
+ </ul>
</div>
- </div>
- <?php } ?>
+</div>
+<?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>
+<?php $this->html('reporttime') ?>
+<?php if ( $this->data['debug'] ): ?>
+<!-- Debug output:
+<?php $this->text( 'debug' ); ?>
+
+-->
+<?php endif; ?>
+</body></html>
+<?php
+ wfRestoreWarnings();
+ } // end of execute() method
+
+ /*************************************************************************************************/
+ function searchBox() {
+?>
<div id="p-search" class="portlet">
<h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
<div id="searchBody" class="pBody">
<form action="<?php $this->text('searchaction') ?>" id="searchform"><div>
- <input id="searchInput" name="search" type="text"<?php echo $skin->tooltipAndAccesskey('search');
+ <input id="searchInput" name="search" type="text"<?php echo $this->skin->tooltipAndAccesskey('search');
if( isset( $this->data['search'] ) ) {
?> value="<?php $this->text('search') ?>"<?php } ?> />
- <input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('searcharticle') ?>"<?php echo $skin->tooltipAndAccesskey( 'search-go' ); ?> />
- <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>"<?php echo $skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />
+ <input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('searcharticle') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-go' ); ?> />
+ <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />
</div></form>
</div>
</div>
+<?php
+ }
+
+ /*************************************************************************************************/
+ function toolbox() {
+?>
<div class="portlet" id="p-tb">
<h5><?php $this->msg('toolbox') ?></h5>
<div class="pBody">
if($this->data['notspecialpage']) { ?>
<li id="t-whatlinkshere"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href'])
- ?>"<?php echo $skin->tooltipAndAccesskey('t-whatlinkshere') ?>><?php $this->msg('whatlinkshere') ?></a></li>
+ ?>"<?php echo $this->skin->tooltipAndAccesskey('t-whatlinkshere') ?>><?php $this->msg('whatlinkshere') ?></a></li>
<?php
if( $this->data['nav_urls']['recentchangeslinked'] ) { ?>
<li id="t-recentchangeslinked"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href'])
- ?>"<?php echo $skin->tooltipAndAccesskey('t-recentchangeslinked') ?>><?php $this->msg('recentchangeslinked') ?></a></li>
+ ?>"<?php echo $this->skin->tooltipAndAccesskey('t-recentchangeslinked') ?>><?php $this->msg('recentchangeslinked') ?></a></li>
<?php }
}
if(isset($this->data['nav_urls']['trackbacklink'])) { ?>
<li id="t-trackbacklink"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href'])
- ?>"<?php echo $skin->tooltipAndAccesskey('t-trackbacklink') ?>><?php $this->msg('trackbacklink') ?></a></li>
+ ?>"<?php echo $this->skin->tooltipAndAccesskey('t-trackbacklink') ?>><?php $this->msg('trackbacklink') ?></a></li>
<?php }
if($this->data['feeds']) { ?>
<li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) {
?><span id="feed-<?php echo Sanitizer::escapeId($key) ?>"><a href="<?php
- echo htmlspecialchars($feed['href']) ?>"<?php echo $skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a> </span>
+ echo htmlspecialchars($feed['href']) ?>"<?php echo $this->skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a> </span>
<?php } ?></li><?php
}
if($this->data['nav_urls'][$special]) {
?><li id="t-<?php echo $special ?>"><a href="<?php echo htmlspecialchars($this->data['nav_urls'][$special]['href'])
- ?>"<?php echo $skin->tooltipAndAccesskey('t-'.$special) ?>><?php $this->msg($special) ?></a></li>
+ ?>"<?php echo $this->skin->tooltipAndAccesskey('t-'.$special) ?>><?php $this->msg($special) ?></a></li>
<?php }
}
if(!empty($this->data['nav_urls']['print']['href'])) { ?>
<li id="t-print"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['print']['href'])
- ?>"<?php echo $skin->tooltipAndAccesskey('t-print') ?>><?php $this->msg('printableversion') ?></a></li><?php
+ ?>"<?php echo $this->skin->tooltipAndAccesskey('t-print') ?>><?php $this->msg('printableversion') ?></a></li><?php
}
if(!empty($this->data['nav_urls']['permalink']['href'])) { ?>
<li id="t-permalink"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['permalink']['href'])
- ?>"<?php echo $skin->tooltipAndAccesskey('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php
+ ?>"<?php echo $this->skin->tooltipAndAccesskey('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php
} elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?>
- <li id="t-ispermalink"<?php echo $skin->tooltip('t-ispermalink') ?>><?php $this->msg('permalink') ?></li><?php
+ <li id="t-ispermalink"<?php echo $this->skin->tooltip('t-ispermalink') ?>><?php $this->msg('permalink') ?></li><?php
}
wfRunHooks( 'MonoBookTemplateToolboxEnd', array( &$this ) );
</div>
</div>
<?php
- if( $this->data['language_urls'] ) { ?>
+ }
+
+ /*************************************************************************************************/
+ function languageBox() {
+ if( $this->data['language_urls'] ) {
+?>
<div id="p-lang" class="portlet">
<h5><?php $this->msg('otherlanguages') ?></h5>
<div class="pBody">
</ul>
</div>
</div>
-<?php } ?>
- </div><!-- end of the left (by default at least) column -->
- <div class="visualClear"></div>
- <div id="footer">
<?php
- if($this->data['poweredbyico']) { ?>
- <div id="f-poweredbyico"><?php $this->html('poweredbyico') ?></div>
-<?php }
- if($this->data['copyrightico']) { ?>
- <div id="f-copyrightico"><?php $this->html('copyrightico') ?></div>
-<?php }
+ }
+ }
- // Generate additional footer links
+ /*************************************************************************************************/
+ function customBox( $bar, $cont ) {
?>
- <ul id="f-list">
-<?php
- $footerlinks = array(
- 'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright',
- 'privacy', 'about', 'disclaimer', 'tagline',
- );
- foreach( $footerlinks as $aLink ) {
- if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
-?> <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li>
-<?php }
+ <div class='generated-sidebar portlet' id='p-<?php echo Sanitizer::escapeId($bar) ?>'<?php echo $this->skin->tooltip('p-'.$bar) ?>>
+ <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5>
+ <div class='pBody'>
+<?php if ( is_array( $cont ) ) { ?>
+ <ul>
+<?php foreach($cont as $key => $val) { ?>
+ <li id="<?php echo Sanitizer::escapeId($val['id']) ?>"<?php
+ if ( $val['active'] ) { ?> class="active" <?php }
+ ?>><a href="<?php echo htmlspecialchars($val['href']) ?>"<?php echo $this->skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li>
+<?php } ?>
+ </ul>
+<?php } else {
+ # allow raw HTML block to be defined by extensions
+ print $cont;
}
?>
- </ul>
</div>
-</div>
-<?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>
-<?php $this->html('reporttime') ?>
-<?php if ( $this->data['debug'] ): ?>
-<!-- Debug output:
-<?php $this->text( 'debug' ); ?>
-
--->
-<?php endif; ?>
-</body></html>
+ </div>
<?php
- wfRestoreWarnings();
- } // end of execute() method
+ }
+
} // end of class
+
+
# Use the first heading from the Monobook sidebar as the "browse" section
$bar = $this->buildSidebar();
+ unset( $bar['SEARCH'] );
+ unset( $bar['LANGUAGES'] );
+ unset( $bar['TOOLBOX'] );
$browseLinks = reset( $bar );
foreach ( $browseLinks as $link ) {