Difference between revisions of "MediaWiki"

Line 1: Line 1:
 
[[Category:Website]]
 
[[Category:Website]]
 +
 +
=Installation=
 +
 +
==Mediawiki==
 +
 +
Get the latest mediawiki LTS version from the official website: https://www.mediawiki.org/wiki/MediaWiki
 +
 +
 +
==Extensions==
 +
 +
MediaWiki comes with a lot of features, but some are still missing. You can use Extensions to improve your wiki.
 +
 +
 +
'''How to know what are the current installed extensions?'''
 +
* Go to ''Special:Version''
 +
 +
 +
'''How to add extensions?'''
 +
*
 +
 +
 +
'''What extensions to install?'''
 +
 +
I personally recommend the following extensions:
 +
* [https://www.mediawiki.org/wiki/Extension:Cite Cite] (bundled by default since 1.21)
 +
* [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight SyntaxHighlight] (bundled by default since 1.21)
 +
* [https://www.mediawiki.org/wiki/Extension:WikiEditor WikiEditor] (bundled by default since 1.18)
 +
 +
  
 
=Configuration=
 
=Configuration=

Revision as of 20:48, 7 July 2016


Installation

Mediawiki

Get the latest mediawiki LTS version from the official website: https://www.mediawiki.org/wiki/MediaWiki


Extensions

MediaWiki comes with a lot of features, but some are still missing. You can use Extensions to improve your wiki.


How to know what are the current installed extensions?

  • Go to Special:Version


How to add extensions?


What extensions to install?

I personally recommend the following extensions:


Configuration

Create users and grants rights

  1. As the Admin user go to Special page > Create account
  2. Set the user rights: go to http://wikiUrl/index.php?title=Special:UserRights
  3. Grant the Administrator and Bureaucrat roles (if required)


Special page > Preferences



Global CSS

Edit page: MediaWiki:Common.css

See http://www.mediawiki.org/wiki/Manual:FAQ


Clear cache

Sometimes you need to clear the cache to see the changes ; especially the UI changes (favicon, CSS, logo, ...)

Use the &action=purge command.


ex: http://www.daxiongmao.eu/wiki/index.php?title=Main_Page&action=purge



Special content

Favicon

1. Copy your FavIcon to the root of your website. It must be either 16x16 or 32x32 in ICO format.


2. Set 'favicon.ico' rights to 644


3. Adjust your localSettings.php

## FAVICON in PNG 
$wgFavicon = "$wgScriptPath/favicon.ico";


Sidebar

Just edit MediaWiki:Sidebar

Source: http://www.mediawiki.org/wiki/Manual_talk:Interface/Sidebar


Ex: http://www.daxiongmao.eu/wiki/index.php?title=MediaWiki:Sidebar



Copyright note

To adjust the text edit MediaWiki:Copyright


To configure the copyrights, adjust your LocalSettings.php

Source: http://www.mediawiki.org/wiki/Manual:$wgRightsText

$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "http://creativecommons.org/licenses/by-sa/3.0/";
$wgRightsText = "Creative Commons Attribution Share Alike";
$wgRightsIcon = "$wgScript/wiki/skins/common/images/creative_commons.png";



Image

Image upload configuration

To enable image upload you need to adjust your LocalSettings.php:


## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
$wgUseImageMagick = false;
$wgImageMagickConvertCommand = "/usr/bin/convert";
#$wgImageMagickTempDir="{$wgUploadDirectory}/temp";


## If you want to use image uploads under safe mode,
## create the directories images/archive, images/thumb and
## images/temp, and make them all writable. Then uncomment
## this, if it's not already uncommented:
#$wgHashedUploadDirectory = false;
#$wgTmpDirectory = "{$wgUploadDirectory}/temp";


You just have to:

  • Enable uploads
  • Not use ImageMagick


On previous version of MediaWiki I was able to use image magick. However it seems it doesn't work anymore on OVH shared hosting... :( Instead I now rely on PHP scripts.


Insert images

Great tutorial: How to insert images into a wiki article ? See: http://www.inmotionhosting.com/support/edu/mediawiki/adding-content-mediawiki/insert-images-wiki