User:Svippong/AdditionalTabs


 * Warning: The following is for an old version of MediaWiki (probably 1.15) and will no longer work.  Look at bug 13228 and change I14351aa5 for current status.

This is the presentation of a slight modification to SkinTemplate.php's function buildContentActionUrls.

Purpose
Some wikis, e.g. Wikinews, has an additional tab. This tab is another namespace attached to these two other tabs; the regular ones "main" and "talk".

This code will allow for the ability to add these tabs, and add lots of them -- if you want to.

Usage
You can easily apply this code to your LocalSettings.php

Afterwards, your page should have these namespaces together. Though, your "comments" (for this example) will appear blank, as no MediaWiki: message is defined for it. Its name will be its parent's namespace id, a hyphen and the name of the additional namespace in the definition array. In other words, for this example, the "comments" namespace's MediaWiki: message would be "MediaWiki:100-comments".

Modified buildContentActionUrls
Find buildContentActionUrls in SkinTemplate.php and replace these lines up until " ".