From MediaWiki.org
Jump to navigation Jump to search
Other languages:Project:Language policy English  • русский
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.svg

Release status:Extension status stable

ImplementationTemplate:Extension#type MyWiki, Skin
DescriptionTemplate:Extension#description Add some items to the personal URLs.
Author(s)Template:Extension#username (RV1971talk)
Latest versionTemplate:Extension#version 1.2.0 (2018-03-25)
Compatibility policyCompatibility#mediawiki_extensions release branches
MediaWikiTemplate:Extension#mediawiki 1.30+
PHPTemplate:Extension#php 5.4
LicenseTemplate:Extension#license GNU General Public License 3.0 or later
  • $wgAddPersonalUrlsTable
Hooks usedTemplate:Extension#hook

Translate the AddPersonalUrls extension if it is available at translatewiki.net

Check usage and version matrix.


Open tasks · Report a bug

The AddPersonalUrls extension adds some items to the personal URLs (the links which in the Vector skin are located near the top of the screen). While it is totally configurable, it comes with a default configuration that adds the following:

  • A link to the list to all subpages of the user's home page.
  • Links to subpages Home, Favorites, Sandbox and Notes of the user's home page.

At the beginning, the new subpages are filled with a configurable default text explaining their purpose. Each user can edit them acccording to personal needs.


  • Download and place the file(s) in a directory called AddPersonalUrls in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'AddPersonalUrls' );
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.


Table of URLs[edit]

The additional URLs are defined in the global variable $wgAddPersonalUrlsTable, which you may customize in your LocalSettings.php. A default table is used if you do not provide a custom one. The table is an array where each entry assigns an ID to a (partial) URL as follows:

  • URLs are inserted after the link to the user's home page, in the order in which they appear in the array.
  • The ID is the name of a system message used to display the link. AddPersonalUrls is shipped with default messages (in the languages de, en, fr and it) for the links in the default $wgAddPersonalUrlsTable.
  • The URL is either a page name (without brackets), optionally followed by a '?' and a query string, or an external link. A URL is recognized an external link iff it contains the string '://'. I'm sure you'll find a better way, so please let me know your ideas.
  • The string $username will be replaced with the current username. Note that in LocalSettings.php, you need to write the URL within single quotes to avoid that PHP already interprets $username while processing LocalSettings.php, in which case it would evaluate to an empty string.

The default content of $wgAddPersonalUrlsTable is currently as follows:

$wgAddPersonalUrlsTable = array(
	=> 'Special:PrefixIndex?prefix=$username&namespace=2',
	'addpersonalurls-home' => 'Special:Mypage/Home',
	'addpersonalurls-favorites' => 'Special:Mypage/Favorites',
	'addpersonalurls-sandbox' => 'Special:Mypage/Sandbox',
	'addpersonalurls-notes' => 'Special:Mypage/Notes'


Since the extension defines a lot of messages which are constantly evolving with further development, they are not documented here. Please refer to i18n/qqq.json.

When a personal page does not exist, the URL opens the page for editing, and the content of the system messages ID-preload and addpersonalurls-preload is preloaded. This will also work for any URLs you add, provided that ID is equal to addpersonalurls-subpage_title_in_lowercase.


In the resulting HTML code, each link is wrapped into an <li> element having an id attribute with value pt-ID. This is a feature provided by MediaWiki and allows to format personal URLs individually via CSS.

The AddPersonalUrls exension uses this feature to add icons, taken from the Wikicommons Nuvola icons, to the new links as well as to the existing ones provided by MedaWiki. You can override this with your own CSS.

Release notes[edit]

These are the release notes for version 1.2.0. See Extension:AddPersonalUrls/History for older releases.

Configuration changes[edit]

The extension is now loaded using the wfLoadExtension() mechanism introduced in MediaWiki 1.25. It is therefore incompatible with older MediaWiki versions.