Last modified: 2010-05-15 15:37:24 UTC
With this patch you can create MediaWiki:CustomNavBlocks and list several other MediaWiki: Articles there. Each article represents a block, so in my MediaWiki:CustomNavBlocks I have: CustomBlockNavigation CustomBlockMyOwnBlock CustomBlockAnotherOne MediaWiki:CustomBlockNavigation is a simple Wikipage with a list of links (mainpage etc.). My script reads this, and displays the links in a box with the title "Navigation" (it cuts the 11 chars: "CustomBlock"). Replace this in Monobook.php: <?php foreach ($this->data['sidebar'] as $bar => $cont) { ?> <div class='portlet' id='p-<?php echo htmlspecialchars($bar) ?>'> <h5><?php $this->msg( $bar ) ?></h5> <div class='pBody'> <ul> <?php foreach($cont as $key => $val) { ?> <li id="<?php echo htmlspecialchars($val['id']) ?>"><a href="<?php echo htmlspecialchars($val['href']) ?>"><?php echo htmlspecialchars($val['text'])?></a></li> <?php } ?> </ul> </div> </div> <?php } ?> with: <?php include ('MyIncludes/customnavblocks.php');?> <mediawikiinstallation>/MyIncludes/customnavblocks.php: <?php $text = $this->translator->translate( 'CustomNavBlocks' ); $customblocks = explode ("\n", $text); while(list($iarg, $ival) = each($customblocks)) { echo "\n<div class=\"portlet\" id=\"" . substr($ival,11,strlen($ival)) . "\">\n"; echo " <h5>" . substr($ival,11,strlen($ival)) . "</h5>\n"; echo " <div class=\"pBody\">\n"; echo " " . $this->msgWiki($ival); echo " </div>\n"; echo "</div>\n"; } ?>
If I read the intent right, and I think I did, then "extra boxes" can be made by starting another first-level bulleted item in MediaWiki:Sidebar.