Using Mediawiki 1.19 and want to add tabs with external links right next to the tab buttons 'Page' and 'Discussion'. How to do it?
The code in the FAQ was outdated. For newer versions of MediaWiki, you have to use the SkinTemplateNavigation hook instead of the SkinTemplateContentActions hook. I updated the FAQ. Basically, you need to do something like this:
$wgHooks['SkinTemplateNavigation'][] = 'replaceTabs';
function replaceTabs( $skin, &$links) {
$links['namespaces']['name_of_tab'] = array(
'class' => false or 'selected', // if the tab should be highlighted
'text' => 'text_of_tab', // what the tab says
'href' => 'url_to_point_to', // where it links to
'context' => 'main',
);
return true;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With