if they ran roughly the same code for both hooks (as is almost certain).
* Signature (~~~~) "cleaning", i.e. template removal, can be disabled with
$wgCleanSignatures=false
+* Extensions can use the SkinBuildSidebar hook to modify the content of the
+ sidebar and add custom portlets to it
=== Bug fixes in 1.14 ===
&$text: bottomScripts Text
Append to $text to add additional text/scripts after the stock bottom scripts.
+'SkinBuildSidebar': At the end of Skin::buildSidebar()
+$skin: Skin object
+&$bar: Sidebar contents
+Modify $bar to add or modify sidebar portlets.
+
'SkinSubPageSubtitle': At the beginning of Skin::subPageSubtitle()
$skin: Skin object
&$subpages: Subpage links HTML
continue;
if (strpos($line, '**') !== 0) {
$line = trim($line, '* ');
- if ( $line == 'SEARCH' || $line == 'TOOLBOX' || $line == 'LANGUAGES' ) {
- # Special box type
- $bar[$line] = array();
- } else {
- $heading = $line;
- }
+ $heading = $line;
+ if( !array_key_exists($heading, $bar) ) $bar[$heading] = array();
} else {
if (strpos($line, '|') !== false) { // sanity check
$line = array_map('trim', explode( '|' , trim($line, '* '), 2 ) );
} else { continue; }
}
}
+ wfRunHooks('SkinBuildSidebar', array($skin, &$bar));
if ( $wgEnableSidebarCache ) $parserMemc->set( $key, $bar, $wgSidebarCacheExpiry );
wfProfileOut( __METHOD__ );
return $bar;