Personalizacion

De Reseñas, la enciclopedia libre.

If you're using a SkinTemplate skin such as MonoBook under MediaWiki 1.4


Changing the makeup of the Quickbar by altering $wgNavigationLinks

On #mediawiki IRC channel I saw question:

  • How can I add links to the navigation bar?

I know that I have read the solution somewhere, but I don't recall where (meta, mailing-list, en-wikipedia, wp.wikidev,...)

So I went the "hard" way :-)))

  1. Open includes/DefaultSettings.php, find the array named $wgNavigationLinks and copy it to LocalSettings.php. As of version 1.4 beta 5 this array has already been placed in LocalSettings.php. Remember: never edit DefaultSettings.php directly. Always make your changes in your own LocalSettings.php file.

LocalSettings.php:

  $wgNavigationLinks = array (
  	array( 'text'=>'mainpage', 'href'=>'mainpage' ),
  	array( 'text'=>'portal', 'href'=>'portal-url' ),
  	array( 'text'=>'currentevents', 'href'=>'currentevents-url' ),
  	array( 'text'=>'mylink', 'href'=>'mylink-url' ),
  	array( 'text'=>'help', 'href'=>'helppage' ),
  	array( 'text'=>'sitesupport', 'href'=>'sitesupport-url' )
  );

In this array, insert a new line with the following contents:

  array( 'text'=>'mylink', 'href'=>'mylink-url' ) 

Click refresh on Main page and tadaaaaaaaaaa : mylink is here. If it's not there you should disable caching in your preferences while you are testing.

  1. Type in your browser's location bar http://URL/MediaWiki:Mylink, and enter the link name. This is the title of the link as it should be shown in the Quickbar. E.g. "Info on monkeys"
  2. Type in your browser's location bar http://URL/MediaWiki:Mylink-url, and enter the link target. The link target is the name of the page which the link should lead to. E.g. "Info_On_Monkeys"

Updates on how to set the title attribute of the link would be much appreciated.

Alternativamente puedes, definir los objetivos de los archivos de idioma.

Language.php:

  'mylink' => 'Google',
  'mylink-url' => 'http://www.google.ch',

Internal links are similar, just don't write the http prefix.

You definitely shouldn't need to do this. I've used this feature myself and never had to edit language.php. Can you confirm that this is still require using a newly installed (with original language file) wiki?
This was just someones suggestion I moved from the Customization page. Its an alternative, which seems relevant when the link is language specific. Its just another way of editing the $wgNavigationLinks array. This page is referenced by Requests for new languages under the item starting Proposal Plans in this context.
Personal tools