Jump to: navigation, search

Add links to the footer[edit]

MediaWiki version: 1.17

As of 1.17 you can modify the list of links in the footer using the SkinTemplateOutputPageBeforeExec to modify the footerlinks arrays and setting new template keys for the values.

For example, putting this in your LocalSettings.php will add a new "Terms of Service" link after the disclaimer link.

$wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'lfTOSLink';
function lfTOSLink( $sk, &$tpl ) {
	$tpl->set( 'termsofservice', $sk->footerLink( 'termsofservice', 'termsofservicepage' ) );
	$tpl->data['footerlinks']['places'][] = 'termsofservice';
	return true;

From there you can put "Terms of Service" in the page MediaWiki:Termsofservice on your wiki, for the link's text and in MediaWiki:Termsofservicepage define the title of the page that you want the Terms of Service link to point to. Note, if you do not create these pages on your wiki, then nothing will appear in the footer.

Another example, if you are writing an extension using MediaWiki 1.28 or later. (1) Add this to your extension.json:

	"Hooks": {
		"SkinTemplateOutputPageBeforeExec": [

(2) Add this to your MyExtension.hooks.php:

	public static function onSkinTemplateOutputPageBeforeExec(&$skin, &$template)
		$template->set('FooLabel', $skin->footerLink('FooLabel', 'FooPage'));
		$template->data['footerlinks']['places'][] = 'FooLabel';
		return true;

(3) Create three pages:

  • Mediawiki:FooLabel (contains text to display in footer, like 'Foo');
  • Mediawiki:FooPage (contains namespace:title of linked page, like 'Project:Foo');
  • Project:Foo (contains detailed page text).

Remember it may take a while to update due to MediaWiki caches. In case you are using Extension:MobileFrontend, which inserts a "Mobile view" link in the footer after the disclaimer link, the new footer links will come after the "Mobile view" link. To solve this, insert the above new footer links code before the code lines used to load the MobileFrontend extension.

MediaWiki version: 1.16

Before Mediawiki 1.17, to add or remove items from the footer on your MediaWiki page, you must edit the individual skin.

For example: if you go in to MonoBook.php (located by default in the skins folder) you will find the following code:

$footerlinks = array(
	'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright',
	'privacy', 'about', 'disclaimer', 'tagline',

In the above you can simply add and remove items from the array that you wish to appear in your footer. This must be done for each skin. It may take a while to update due to MediaWiki caches.

Customizing the Built-in items[edit]

You can also customize the individual built-in items by modifying certain pages or parameters:



MW 1.24 and before

  • if $wgMaxCredits is not zero it will display page editors
  • i.e. set $wgMaxCredits = 10; or any other number
  • not currently used in the footer

To remove the privacy, about and/or disclaimer links entirely, replace the link text with a single dash ("-").


See $wgFooterIcons.

Text and Images[edit]

Currently (as of September 2016) there does not seem to be a way (an easy way?) to add an entry, which consists of text and an image at the same time. This still is a missing feature.

See also[edit]