MediaWiki/Customization

Change Logo
The default logo is: /skins/common/images/wiki.png (135x135)

To change $wgLogo: $wgLogo            = "$wgStylePath/common/images/wiki.png";
 * 1) The relative URL path to the logo.  Make sure you change this from the default,
 * 2) or else you'll overwrite your logo when you upgrade!

Allow Uploads
LocalSettings.php: $wgEnableUploads      = true;
 * 1) To enable image uploads, make sure the 'images' directory
 * 2) is writable, then set this to true:

NOTE: Only users who are logged in will be able to Upload files.

Hide [edit] links
How do I hide the section edit links for users who are not logged in? 

Edit your skin, eg MonoBook.php, and add this before :

data['loggedin']) { ?> 

If you want to hide the links for all users including logged in users, instead edit monobook/main.css and add .editsection { display: none; }

Enable Uploads for .zip Files
Modify LocalSettings.php and add: // List of allowed uploadable file extentions $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'zip' );

Then you can upload the file and add a link via: [[Media:Test.zip]] or [[Media:Test.zip|My File]]

Edit Sidebar
See: /MediaWiki:Sidebar

Edit Sidebar menu items: /MediaWiki:Sidebar?action=edit

old: ?title=MediaWiki:Sidebar&action=edit

Also accessible via:
 * 1) Click on Special pages in the toolbox menu.
 * 2) Click on All pages.
 * 3) Change the drop-down menu to "MediaWiki."

Manual:Interface/Sidebar - MediaWiki - https://www.mediawiki.org/wiki/Manual:Interface/Sidebar

Remove Tabs
Manual:Remove Tabs - MediaWiki - https://www.mediawiki.org/wiki/Manual:Remove_Tabs

Edit MediaWiki:Common.css

Edit Area Rows
This is a per user setting under the user's preferences:
 * My Preferences
 * Editing
 * Default: Rows 25 x Columns 80
 * Bump to Rows 35 for a larger screen

Search Suggestion
Manual:$wgEnableMWSuggest - MediaWiki - http://www.mediawiki.org/wiki/Manual:$wgEnableMWSuggest
 * "Enable AJAX autocomplete search suggestions (autosuggest) while typing in search boxes (results are passed around in OpenSearch format). This setting replaces $wgAjaxSearch that was used in earlier versions of MW."

$wgEnableMWSuggest = true;

Extension:Link Suggest - MediaWiki - http://www.mediawiki.org/wiki/Extension:Link_Suggest
 * "Adding links to an article seems easy. But what happens when you dont know the exact capitalization, or wording of an article? Usually you open a new tab and do a search. This plugin adds a new button to the edit tool bar that when clicked, adds an ajax search bar to find links. This plugin is in very beta, but I am putting it out here because I think it is usable, and it is as far as I can take it. I would love help on this to make it better."

Extension:Search Suggest - MediaWiki - http://www.mediawiki.org/wiki/Extension:Search_Suggest
 * "This extension is obsolete! It has been replaced by core functionality in the MediaWiki software (which was added in version 1.13.0). See Manual:$wgEnableMWSuggest for the new core feature."

Subpages
Wikibook uses subpages to organize pages into a hierarchy. Exmaple: /book/chapter/page

Help:Subpages - MediaWiki - http://www.mediawiki.org/wiki/Help:Subpages

Table of contents:

Manual:$wgNamespacesWithSubpages - MediaWiki - http://www.mediawiki.org/wiki/Manual:$wgNamespacesWithSubpages

LocalSettings.php: $wgNamespacesWithSubpages[NS_MAIN] = true;
 * 1) Enable subpages in the main namespace

php - What Software Does Wikibooks Use? - Webmasters Stack Exchange - http://webmasters.stackexchange.com/questions/8360/what-software-does-wikibooks-use
 * http://en.wikibooks.org/wiki/Special:Version

Better subpage toc formatting:
 * Extension:SubPageList - MediaWiki - http://www.mediawiki.org/wiki/Extension:SubPageList
 * SubPageList/README.md at master · JeroenDeDauw/SubPageList · GitHub - https://github.com/JeroenDeDauw/SubPageList/blob/master/README.md

https://github.com/JeroenDeDauw/SubPageList/raw/master/doc/subpagelist.png

Using Wikibooks/How To Structure A Wikibook - Wikibooks, open books for an open world - http://en.wikibooks.org/wiki/Using_Wikibooks/How_To_Structure_A_Wikibook
 * Guide to structuring a book

Book_Title/Chapter_Name Book_Title/Chapter_Name/Page_Name

Nice looking navigation template:
 * How to use a Motorola DVR/Configuration - Wikibooks, open books for an open world - http://en.wikibooks.org/wiki/How_to_use_a_Motorola_DVR/Configuration

How to use a Motorola DVR Identify | Connections | Setup | ...

Default Skin
Manual:$wgDefaultSkin - MediaWiki - http://www.mediawiki.org/wiki/Manual:$wgDefaultSkin

"This setting defines the default skin and should be set to the lowercase name of the skin (e.g. 'monobook', not 'MonoBook'). Note that this only sets the default skin, for new users and anonymous visitors."

Default Main Page
How do I change which page is the main page? - http://www.mediawiki.org/wiki/Manual:FAQ#How_do_I_change_which_page_is_the_main_page.3F
 * By default, MediaWiki looks for a page with the title Main Page and serves this as the default page. This can be changed by altering the contents of MediaWiki:Mainpage to point to a different title. If this does not change the 'Main Page' link included on the sidebar at install time, edit MediaWiki:Sidebar.

Revision Deleteion
$wgGroupPermissions['sysop']['deleterevision'] = true; $wgGroupPermissions['sysop']['deletelogentry'] = true;
 * 1) RevisionDelete - http://www.mediawiki.org/wiki/Manual:RevisionDelete
 * 2) Fails with: Cannot inherit previously-inherited or override constant READ_LATEST
 * 1) $wgGroupPermissions['oversight']['hideuser'] = true;
 * 2) $wgGroupPermissions['oversight']['suppressrevision'] = true;
 * 3) $wgGroupPermissions['oversight']['suppressionlog'] = true;

Bug 65175 – RevisionDelete - Cannot inherit previously-inherited or override constant READ_LATEST from interface IDBAccessObject in Revision.php on line 26 - https://bugzilla.wikimedia.org/show_bug.cgi?id=65175

Delete All History

 * 1) DeleteHistory - http://www.mediawiki.org/wiki/Extension:DeleteHistory
 * 2) Enable when needed
 * 3) $wgGroupPermissions['sysop']['DeleteHistory'] = true;
 * 4) include('extensions/DeleteHistory/DeleteHistory.php');

Modify General CSS
CSS placed here will be applied to all skins

https://wiki.example.com/wiki/MediaWiki:Common.css

CSS placed here will affect users of the Vector skin

http://wiki.example.com/wiki/MediaWiki:Vector.css

Modify User's CSS
https://wiki.example.com/wiki/Special:MyPage/common.css

Hide Sidepanel
You can do so by adding something like the following to your wiki's MediaWiki:Vector.css / MediaWiki:Common.css page. /** Hide sidebar **/ div#mw-panel { display: none; } left: 1em; } div#content, div#footer { margin-left: 1em; } References:
 * 1) left-navigation {
 * 1) mw-head-base,
 * removing sidebar permanently from all wiki pages. - MediaWiki - https://www.mediawiki.org/wiki/Thread:Project:Support_desk/removing_sidebar_permanently_from_all_wiki_pages.

Hide Footer
Add the following to MediaWiki:Common.css: /** Hide Footer **/ display: none; }
 * 1) footer {

Other

 * 1) For more information on customizing the URLs please see:
 * 2) http://www.mediawiki.org/wiki/Manual:Short_URL


 * Installing and Customizing MediaWiki
 * MediaWiki FAQ


 * MediaWiki Tips and Tricks:
 * How to Automatically Create a Sitemap for Google Sitemaps (Webmaster Tools)
 * Adding Google Adsense to your MediaWiki Site
 * Adding Google Search Box to your MediaWiki Site
 * How to Hide MediaWiki's Image History from Non-logged in Visitors
 * How do i remove the funny arrow icon beside external links in MediaWiki

Linux Journal: Installing and Customizing MediaWiki
 * Installing MediaWiki
 * Virtual Servers
 * Basic Navigation and Editing
 * Special Pages