Talk:Requests for comment/Custom inter-namespace tabs


Should be extension of current namespace-relationship system[edit]

Seeing as it is primarily inspired by code I wrote (albeit some years ago now), I think I should explain what I wanted to do.

Essentially, I wanted the third, fourth, etc. namespace to work like the current page/discussion system. The Page is the main namespace, while Talk is a subnamespace (obviously not internally). Citation or Opinions would thus be on the same level as Talk.

This system also allowed you to remove a Talk namespace from a Page namespace (or at least, that was the intent), so you could be in full control of your own namespaces, as well as modifying the standard ones.

As for the considerations:

  • Put code in a MediaWiki extension or in core???

Either is fine by me, I actually intended later to write it as an extension, but never got around to.

  • Localizable tab name

Seeing as it uses a message rather than what you write in LocalSettings.php (but obviously based on that), I will believe that is possible, but it tends to be unique to a certain wiki (of a certain language), so is that even necessary?

  • Configurable in LocalSettings.php with an array or something?

My solution was certainly not the most elegant one, so I would love to see an alternative proposal.

  • Tab has to account for page existence

I do not believe so, I think the tab should function just like the Talk tab, where it turns red if the page doesn't exist. (Unless, of course, that is what you mean.)

I look forward to see more progress on this. --Svippong (talk) 22:54, 7 December 2012 (UTC)Reply[reply]

I don't really get this RFC. It is already possible to add new namespace tabs to the UI. Daniel Friesen (Dantman) (talk) 00:38, 8 December 2012 (UTC)Reply[reply]
How? --MZMcBride (talk) 03:46, 8 December 2012 (UTC)Reply[reply]
Register a SkinTemplateNavigation hook. Namespace tabs are in $links['namespaces'] and can be changed. Then use SkinTemplatePreventOtherActiveTabs to conditionally disable other tabs when yours is active. Daniel Friesen (Dantman) (talk) 04:10, 8 December 2012 (UTC)Reply[reply]
I think such a system should be an extension. The use case is not common enough to warrant putting this sort of thing in core. For the wikinews use case, you also have to make sure the "comments talk" namespace tab dissapears from pages in the comments namespace. Bawolff (talk) 22:17, 24 December 2012 (UTC)Reply[reply]

Links to Gerrit?[edit]

Hey MZMcBride,

Could you please add links to the applicable Gerrit patchsets in the RFC infobox? Thank you! Drdee (talk) 17:27, 22 November 2013 (UTC)Reply[reply]


See now Extension:NamespaceRelations. Cavila (MW 1.22, MySQL 5.5.37-0, Php 5.4.4-14 squeeze, SMW 1.9.2, SF 2.7) 07:26, 23 May 2014 (UTC)Reply[reply]