Allow the search box, toolbox and languages box in the Monobook sidebar to be moved...
authorTim Starling <tstarling@users.mediawiki.org>
Mon, 7 Jul 2008 06:58:44 +0000 (06:58 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Mon, 7 Jul 2008 06:58:44 +0000 (06:58 +0000)
RELEASE-NOTES
includes/Skin.php
skins/CologneBlue.php
skins/Modern.php
skins/MonoBook.php
skins/Standard.php

index 6236654..822a81a 100644 (file)
@@ -179,7 +179,11 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * 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
index 176f449..a9e44ab 100644 (file)
@@ -1677,7 +1677,12 @@ END;
                                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 ) );
index b57c13d..29addfc 100644 (file)
@@ -178,6 +178,9 @@ class SkinCologneBlue extends Skin {
 
                # 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 ) {
index 0d96f64..e75e4ae 100644 (file)
@@ -38,6 +38,7 @@ class SkinModern extends SkinTemplate {
  * @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
@@ -48,7 +49,7 @@ class ModernTemplate extends QuickTemplate {
         */
        function execute() {
                global $wgUser;
-               $skin = $wgUser->getSkin();
+               $this->skin = $skin = $wgUser->getSkin();
 
                // Suppress warnings to prevent notices about missing indexes in $this->data
                wfSuppressWarnings();
@@ -149,42 +150,103 @@ class ModernTemplate extends QuickTemplate {
 
        <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' ); ?> />&nbsp;
-                               <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' ); ?> />&nbsp;
+                               <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>
@@ -194,23 +256,23 @@ class ModernTemplate extends QuickTemplate {
                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>&nbsp;</span>
+                                       echo htmlspecialchars($feed['href']) ?>"<?php echo $this->skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a>&nbsp;</span>
                                        <?php } ?></li><?php
                }
 
@@ -218,27 +280,32 @@ class ModernTemplate extends QuickTemplate {
 
                        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'] ) { ?>
@@ -253,61 +320,33 @@ class ModernTemplate extends QuickTemplate {
                        </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
 ?>
index 5d70124..bfd94d5 100644 (file)
@@ -36,6 +36,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
@@ -46,7 +47,7 @@ class MonoBookTemplate extends QuickTemplate {
         */
        function execute() {
                global $wgUser;
-               $skin = $wgUser->getSkin();
+               $this->skin = $skin = $wgUser->getSkin();
 
                // Suppress warnings to prevent notices about missing indexes in $this->data
                wfSuppressWarnings();
@@ -152,38 +153,85 @@ class MonoBookTemplate extends QuickTemplate {
                        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' ); ?> />&nbsp;
-                               <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' ); ?> />&nbsp;
+                               <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">
@@ -192,23 +240,23 @@ class MonoBookTemplate extends QuickTemplate {
                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>&nbsp;</span>
+                                       echo htmlspecialchars($feed['href']) ?>"<?php echo $this->skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a>&nbsp;</span>
                                        <?php } ?></li><?php
                }
 
@@ -216,20 +264,20 @@ class MonoBookTemplate extends QuickTemplate {
 
                        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 ) );
@@ -239,7 +287,12 @@ class MonoBookTemplate extends QuickTemplate {
                </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">
@@ -251,45 +304,34 @@ class MonoBookTemplate extends QuickTemplate {
                        </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
+
+
index 7d4eb9a..87a151f 100644 (file)
@@ -153,6 +153,9 @@ class SkinStandard extends Skin {
 
                # 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 ) {