Fandom

How To Wiki

How to customize MediaWiki

1,795pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.




TitlesEdit

Mediawiki.pagetitle-screenshot

Example of text the page title, Mediawiki:Pagetitle, in this example, '$1 - Wikihowto: a howto site anyone can edit'

Mediawiki.search-screenshot

Example of text added to search box, Mediawiki:Search, in this example 'search for a howto'



Article tabsEdit

Mediawiki.edit-screenshot

Example of text for the edit tab, Mediawiki:Edit, in this example, 'edit this page'



Menus, listsEdit

Mediawiki.sidebar-screenshot

Example of a sidebar, Mediawiki:Sidebar

  • Mediawiki:Sidebar: The links and sections on the side bar (i.e. on Wikihowto main, navigation, and page list sections.
  • MediaWiki:Licenses: List of available licenses for images/files appearing in a drop-down list on file upload page.
Mediawiki.navlinks-screenshot

Example of text for the NavLinks, Mediawiki:NavLinks



Upload pageEdit

MediaWiki SpecialUpload interface labelled

Configs for the upload pages

  • MediaWiki:License: the text before the license list. Default="License:"
  • MediaWiki:Licenses: List of available licenses for images/files appearing in a drop-down list on file upload page.
  • MediaWiki:Uploadtext: Text appearing on the upload page, including warnings about images without copyright information, etc.


Page name variablesEdit


Text added to specific pagesEdit

Mediawiki.edittools-screenshot

Example of edit tools for creating a new article located under the edit box, MediaWiki:Edittools

  • MediaWiki:Edittools: Provides list of special characters appearing below edit box and save/preview buttons
  • MediaWiki:Sharedupload: Appears on the page of any image or file used in wikibooks but actually located on commons. Most wikis use a template linking to the commons page.
Mediawiki.newarticletext-screenshot

Example of text for creating a new article, MediaWiki:Newarticletext



FooterEdit

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

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


Add linksEdit

As of 1.17 you can modify the list of links in the footer using the Template:Hook 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 Template:Blue on your wiki, for the link's text and in Template:Blue 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.

Remember it may take a while to update due to MediaWiki caches.


Remove footer iconsEdit

You can hide the Powered by MediaWiki image by adding the following to your wiki's MediaWiki:Common.css:

#f-poweredbyico { display: none; }

The Vector skin equivalent is:

#footer-icon-poweredby { display: none; }

In MW 1.17 with Vector Skin:

#footer-icon-poweredbyico { display: none; }

In MW 1.18 with Vector Skin:

#footer-poweredbyico { display: none; }

If you want to remove it completely in 1.17 you can use Template:Wg to remove it using this in your Template:Manual:

unset( $wgFooterIcons['poweredby'] );

In 1.16 and below you will have to use a hook to remove it:

$wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'lfRemovePoweredBy';
function lfRemovePoweredBy( $sk, &$tpl ) {
	unset( $this->data['poweredbyico'] );
	return true;
}

If you wish to change the icon images, urls, alt text, or add new icons please see Template:Wg' documentation.

Text added to all pagesEdit

Mediawiki.sitenotice-screenshot

Example of a site notice, MediaWiki:Sitenotice


  • MediaWiki:Sitenotice: Text that appears at the top of every page on the site, just below the tabs
  • MediaWiki:Tagline: The text appearing just below a page title (on wikibooks, this currently reads "From Wikibooks, the open-content textbooks collection").


Configuration for whole siteEdit

Be careful with these



OtherEdit

UncategorizedEdit

Customize in LocalSettings.phpEdit


See alsoEdit

ReferencesEdit


From HowTo Wiki, a Wikia wiki.