Extension:AddPersonalUrls

Purpose
This extension adds some items to the personal URLs bar. It can be seen as a demo for using the PersonalUrls hook. You're likely to customize it for your needs.

The current version adds the following items:


 * A link to the Extension:DynamicPageList Special Page which displays all subpages of the user's page.


 * A link to a subpage "Favorites" of the current user's page.


 * A link to a subpage "Sandbox" of the current user's page.


 * A link to a subpage "Notes" of the current user's page.

Except the first item, all of these are blank pages at the beginning which belong to your personal space. You can store any kind of wikitext in it, the names are just suggestions.

Installation
Even though this extension has been tested on MediaWiki 1.9, it is likely to work on earlier versions as well.


 * Save the to a file extensions/AddPersonalUrls/AddPersonalUrls.php.


 * Add the following line to your LocalSettings.php:


 * Create system messages that will be used as titles. The needed pages and suggested contents are:
 * MediaWiki:Mypages – my pages
 * MediaWiki:Favorites – my favorites
 * MediaWiki:Sandbox – my sandbox
 * MediaWiki:Mynotes – my notes


 * The new URLs are defined in the static class member ExtAddPersonalUrls::$mTable. You may customize this in your LocalSettings.php. The string '$username' will be replaced with the current username (you need to write this within single quotes to avoid that PHP already interprets this while processing LocalSettings.php, in which case it would evaluate to an empty string).


 * You need to have the Extension:DynamicPageList installed, otherwise the first item does not work. If you can't or don't want to do that, put the following in your LocalSettings.php:

unset( ExtAddPersonalUrls::$mTable[0] );

Change Log

 * 0.3 :
 * Configuration parameter is now a class member.


 * 0.21 :
 * Bugfix in mypages.


 * 0.2 :
 * Configure items via a customizable array.


 * 0.1 :
 * First version published.