Wiki - customizing

From NoskeWiki
Jump to: navigation, search

About

NOTE: This page is a daughter page of: Wiki


Once MediaWiki is installed (see: Wiki - installing) there are several steps you'll want to go through to customize it. On this page I have outlined the most important steps I use to customize the look and feel of my wiki.


Customizing

The first thing you'll probably want to do (even before you start adding pages) is display your own logo in the top left corner. To do this:

  • Open wiki/LocalSettings.php (pretty much everything you need to customize your site is done using this file)
  • Find the line which reads: $wgSitename = "NoskeWiki"; and directly under that add the line of code:
$wgLogo             = "http://www.andrewnoske.com/images/wiki_logo.jpg";
  • Save and upload LocalSettings.php


TIP: Rather than add the line above I prefer to add these lines:

//################################################################################
//## ADDED LINES:
$wgLogo             = "../images/wiki/wiki_logo.png";
//################################################################################

.. this provides a good spot to insert any other new commands. Any lines of code I change I like to add "//## MODIFIED LINE" at the end of. This allows me to easily identify all the changes I've made.


Adding Images

To add your fist image you will need to:

  • Go to the remove server and change the permissions of the "image" directory to '755'
  • Go to the local server, find the line $wgEnableUploads = false; and change it to true
  • Edit any page, add the line [[Image:my_first_image.jpg]] where you want to add an image, and click "Save Changes"
  • Click where the red link appears, and this will immediately allow you to upload an image from your computer.
  • You can also add an image using the "Upload Files" link on the left, but I find this method faster.


Allow Upload of Other File Types

By default files like .pdf, .doc and so on are not allowed. To change this add the line:

$wgFileExtensions = array('pdf','png','jpg','jpeg','ogg','doc','xls','ppt','docx','xlsx','pptx','mp3');


Change Sidebar

The side bar can be changed by going to MediaWiki:Sidebar. Only the main wiki sysop user can change this. An example of what I enter:

* navigation
** mainpage|mainpage-description
** recentchanges-url|recentchanges
** randompage-url|randompage
** helppage|help
* Categories
** Category:Personal|Personal
** Category:Computers|Computers
** Category:Programming|Programming
* SEARCH
* TOOLBOX
* LANGUAGES

Original Text:

* navigation
** mainpage|mainpage-description
** portal-url|portal
** currentevents-url|currentevents
** recentchanges-url|recentchanges
** randompage-url|randompage
** helppage|help
* SEARCH
* TOOLBOX
* LANGUAGES


Add MediaWiki Extensions

MediaWiki extensions are typically fairly easy to install packages which add functionality to your site. I've listed some I use and recommend here:


Links