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 a special page based on Extension:DynamicPageList 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.10, 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).


 * If you want to use the first item, you need to install Extension:DynamicPageList (version >= 1.4) and the Call Extension (which is contained in the same bundle). Furthermore, you need to create a page Template:My_Pages containing


 * Alternatively, you can do without the first item, by putting the following in your LocalSettings.php:

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

Change Log

 * 0.31 : Adapted to the new version of Extension:DynamicPageList which does not have a dedicated special page any more.


 * 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.