On Tue, 28 Mar 2006 14:36:08 +0200 Birger bweynants@gmail.com wrote:
A hierarchical navigation bar can be implemented by changing code in monobook.php ( http://meta.wikimedia.org/wiki/Customization#How_do_I_add_an_editable_Left_M...). Unfortunately this only works in case $wgUseDatabaseMessages in defaultsettings.php is set to "true".
In my case, this variable is set to false, in order to be able to use another language (Dutch instead of English) in our wiki. BUT by setting $wgUseDatabaseMessages=false, the mediawiki-namespace (into which the navigation bar has to be changed) is not read anymore.
To change the content of the navigation bar, I had to adapt the language.phpfile:
'sidebar' => '
- navigation
** mainpage|mainpage ** portal-url|portal ** currentevents-url|currentevents ** recentchanges-url|recentchanges ** randompage-url|randompage ** helppage|help
- Cases
** Businesscase|Business ** Technicalcase|Technical ',
but i cannot implement a hierarchical menu by changing e.g. ** Technicalcase|Technical into *** Technicalcase|Technical. Does anyone know how to solve this problem so that I can implement a hierarchical menu while $wgUseDatabaseMessages=false? Do I have to change code in the language.php file or in the monobook.phpfile?
Thanks in advance! Birger
If you're using $wgUseDatabaseMessages=false, MediaWiki just gets his messages from Language.php and (in your case) LanguageNl.php. So if you want to change the messages, you can just edit these files. In this case you need to edit the message "Sidebar". Because you're not using database-messages, you can just edit this message in Language.php.
The hack at http://meta.wikimedia.org/wiki/Customization#How_do_I_add_an_editable_Left_M... does not care where the messages come from. If the messages come from the database or from the Language??.php files, both cases work. But only if you've applied the hack of course.
In my case, this variable is set to false, in order to be able to use another language (Dutch instead of English) in our wiki.
Hint: To fill the database with Dutch messages instead of English messages, you can run maintainance/rebuildMessages.php. (keep in mind this does not change the language preferences of the user (every user can set in his/her preferences his/her prefered language, so it's best to test such things as anonymous user). You don't have to, you can just continue using Language??.php files. It makes MediaWiki faster.
Succes, Wilinckx.
--