Open main menu

Changes

841 bytes added ,  10:54, 31 March 2016
Adds info and example about customizing Interface Messages
The navigation system is setup through a special type called an 'interface message'. (The interface message system is also used for many other aspects of the Mediawiki system.) This means that you don't actually have to change 'code' to affect the menu. You can simply edit a special page in the mediawiki system. Edits to this page get stored in the database like every other page edit which provides built-in versioning etc. However, it can also mean that pushing changes from a development machine to a server can be more challenging than pushing 'code' changes.
In any case, to change the nav, you will want to edit the '''[[MediaWiki:Sidebar]]''' page. (e.g. http://example.com/wiki/index.php/MediaWiki:Sidebar) The right to edit this page is normally restricted to administrators, so if you want to delegate the responsibility for this, you will want to look at the user permissions system. There are rules and conventions which apply here, and you can [[mw:Manual:Navigation_bar | find more help in the documentation]]. In case you are going to change the location of blocks like the '''search''' box or '''toolbox''' (which normally show up in the sidebar) by making a custom theme, you'll want to coordinate those changes with the sidebar.
It is possible, using JavaScript, to customize the '''search''' or '''toolbox'''. (We did this for the [https://www.mediawiki.org/wiki/Extension:Html2Wiki Html2Wiki extension].) See the article here on [[MediaWiki/Toolbox]].
 
== Interface Messages ==
At [[Special:AllMessages]], you can see the interface messages (sometimes referred to as System Messages) for the MediaWiki system. See [[mw:Help:System message]]
 
In MediaWiki 1.18 and above, you can find a message key by browsing a wiki in the special pseudo-language code <code>'''qqx'''</code>, which can be done by appending <code>?uselang=qqx</code> to the URL, or <code>&uselang=qqx</code> if the URL already contains a <code>?</code> character ([{{fullurl:{{FULLPAGENAME}}|uselang=qqx}} example]). All the messages will then be replaced by their message keys, so you can identify which message is responsible. Messages that are always in the content language will not be shown using qqx.
 
Aside from changing the Navigation bar, this is how we customized the ISBN message that is used in the 'Book Sources' special page e.g. [[Special:BookSources/1594200068]]
== How to make your own skin ==
4,558

edits