Book Image

MediaWiki 1.1 Beginner's Guide

By : Jeff Orlof, Mizanur Rahman
Book Image

MediaWiki 1.1 Beginner's Guide

By: Jeff Orlof, Mizanur Rahman

Overview of this book

<p>MediaWiki is the free, open-source wiki engine software that powers Wikipedia and many of the other popular wikis across the Web. Written in PHP, it possesses many features that make it the engine of choice for large collaborative wikis: flexible markup, comprehensive user management, multimedia handling, and more. Whether you are creating a public wiki for open contributions, a private wiki for collaborating within your work team or group of friends, or even a wiki for personal use, this book will provide you with all the essential steps you require to achieve this.<br /><br />This book covers how to administer users, back up and restore content safely, migrate your installation to another server or database, and even make hacks to the code. From the installation process to customizing the pages, you will learn what it takes to run a well designed, secure MediaWiki site.<br /><br />Throughout the course of this book, you will see the many different ways that MediaWiki can be used on the Web. This book covers the open source MediaWiki wiki engine from installation and getting started through structuring your collaborative web site, advanced formatting, images, and multimedia to migrating your installation and creating new MediWiki templates. While you will be introduced to the many uses of a wiki, you will also be taken through step-by-step exercises that will help you master the many administrative tasks associated with running and securing your wiki. You will learn how to prevent unauthorized edits being made to content, how to prevent spam, how to back up and restore your wiki, how to configure its look and functionality to suit your needs, and much more.</p>
Table of Contents (21 chapters)
MediaWiki 1.1
Credits
About the Authors
About the Reviewers
Preface

MediaWiki


Now that we know the history of the wiki, and understand how wikis can serve many purposes, let's take a look at the most powerful wiki engine available—MediaWiki.

MediaWiki came to life to solve issues that Wikipedia was having with its wiki engine, UseModWiki. As Wikipedia grew and its content and traffic increased, it began to outgrow the Perl-based UseModWiki. To address page load problems and provide greater functionality, Lee Daniel Crocker went to work on a PHP-based application that utilized a MySQL database for the backend while Magnus Manske went to work on the user interface.

In June 2003, Jimmy Wales, co-founder of Wikipedia, announced the creation of the Wikimedia Foundation to manage all projects related to Wikipedia. In August of the same year, MediaWiki was introduced and is now the wiki engine that runs all of the projects under the Wikimedia Foundation, including the flagship Wikipedia.

MediaWiki's features

One of the reasons that MediaWiki is the wiki engine of choice for many organizations is that it has so many features available for both users and administrators. Let's take a look at a few:

  • Easy navigation system: MediaWiki provides an easy navigation system with options such as a search feature, a Go button that takes you directly to a page you have searched for, Random page, Special pages, and a Printable version for articles.

  • Editing, formatting, and referencing: MediaWiki provides an easy way to edit, format, and reference pages with other pages. It also gives us the option to track changes. As wikis are deployed in multi-user environments, the ability to see who created or edited a piece of content is a key feature to manage the content properly.

  • Look and feel change: Users can change the look and feel of a wiki site using MediaWiki. They can use a variety of skins and make style changes for their individual pages.

  • File uploading: MediaWiki gives you an option to add file upload capabilities to your pages as we saw with ECGpedia. It also gives you flexibility to decide the allowable file extensions that can be uploaded by users and also a list of file extensions to be blocked.

  • Multilanguage support: MediaWiki supports many languages and UTF-8. So you can implement MediaWiki in different languages. Many sites such as Wikipedia use the multilingual feature, which allows you to read and write different languages using the same piece of software.

  • User management: MediaWiki has a built-in user management system where you can create new logins and assign user privileges if you require greater access control. You can also customize privileges for user types in order to fit your security needs.

  • Syndication: MediaWiki supports web syndication by providing RSS syndication for many special pages such as Special pages | Newpages and Special pages | Recentchanges. Syndication helps you to grow your site rapidly in the web world.

MediaWiki and other wiki engines

Of course, MediaWiki is not the only wiki engine to choose from. If you visit a site called Wikimatrix (www.wikimatrix.org) you will see a long list of wiki engines that are available to you. Now, MediaWiki was created specifically to run the largest wiki in existence. It is the choice of large corporations such as Intel and Novell and small to medium-sized businesses such as Moby Games. Many free/open source projects rely on MediaWiki as an integral part of their online presence. However, if you still don't know if MediaWiki is the right choice for you, let's look at how it stacks up against some of the other wiki engines. The list below introduces us to some of the other popular wiki engines:

  • DokuWiki: DokuWiki is a simple wiki engine written in PHP and can be used to create any type of document. It is simple and standards compliant. It is suitable for small companies, development teams, and user groups. Instead of using a database, DokuWiki's data is saved in a plain text file or a flat file. The syntax is very simple yet powerful enough to create any type of content. Key features includes simplified editing, linking, support for image and other files, and plugins support to extend wiki functionality.

  • PhpWiki: PhpWiki is a clone of original WikiWikiWeb. It was the first wiki software written in PHP and was released in 1999. It supports a majority of the databases. The installation process is very simple and gives you what you look for in an out of the box solution. It supports plugins in order to increase functionality. It is suitable for free-form discussion-based site creation and also for collaborative development sites.

  • PmWiki: PmWiki is a PHP-based wiki that does not require any database and uses flat files like DokuWiki. It is very easy to install it and extend its functionality. It supports a template system in order to change the look and feel of the website as well as the functionality to a great extent. It also provides an access control system in order to protect site pages or groups of pages by enabling a password-protected mechanism. It also gives ample opportunity to customize the site as well as extend its functionality using plugins.

  • QwikiWiki: QwikiWiki is another wiki system written in PHP and does not require any SQL database in order to operate. It uses cookies and its own filesystem in order to process and manage files. It has some key features such as file uploading, a template system, and an access control system.

  • Wikipage: It is small, but a wiki standard, easy-to-use system. Wikipage is more secure than TipWiki. It has password-protection support for access control, multilanguage, and multisite support. Other common features include file uploading, table support, and so on.

  • TWiki: TWiki is a flexible, powerful, and easy-to-use enterprise collaboration platform and knowledge management system. It is a structured wiki written in Perl. It is typically used to run a project development space, a document management system, a knowledge base, or any other groupware tool, on an intranet or on the Internet. It does not require any database since the data is stored in filesystem. It has a large plugin system with more than 200 plugins available to use such as spreadsheet, image gallery, slide shows, drawings, charts, graphs, and so on.

  • Kwiki: Kwiki is perhaps the simplest to install, most modular, and easiest to extend. It is written in Perl and also available in CPAN. Other than providing basic wiki features, Kwiki by default offers slide shows, page backups, privacy options, and blog capabilities that are not found in any other wiki. It supports a plugins system in order to extend functionality.

  • MoinMoin: MoinMoin is written in Python and has been derived from the PikiPiki wiki engine. This wiki uses a flat file and folder in order to save data. It does not require any database for operation. It is extensible and customizable. It supports subpages, Unicode, RSS feed, a template system, theme support, an access control list, and an anti-spam feature.

Note

While flat files are easy to compress, databases provide you with much more scalability and are easier and faster to search. Also, wiki engines that rely on flat files often require a script to run that writes the file. If you are planning to deploy one of these wiki engines on a hosted website, make sure your hosting provider allows you to run scripts on the server.

How MediaWiki fits your needs

While the wiki engines mentioned in the previous section have some great features and qualities, MediaWiki is still a better choice due to the extensive feature set and flexibility it offers. Let's take a moment to see how MediaWiki can best fit your needs:

  • Simple editing: Every page contains an edit link on the top navigation bar that only needs to be clicked to open the editing screen. When you finish making changes, you can post them by clicking the Save page button, so your changes go live on the site.

  • Use of simple markup: Editing in HTML is difficult if you do not know HTML tags. While WYSIWYG editors take away the need to be fluent in HTML, there are cases when you need to work with HTML markup. With MediaWiki you don't have to remember complex tags; it has its own type of syntax that is made up of a few simple markup rules. This makes editing simpler and the proper HTML tag conversion is done by the system. MediaWiki will solve this problem by writing the HTML for you. These rules are designed to make wiki markup easy for general users to write and adopt.

  • Recording histories: MediaWiki will save a copy of your old pages and let you revert to an older version of a page if you need to. In fact, MediaWiki will display a comparison, called a diff, which shows you the exact changes you or someone else has made to your page over time. So if someone edits an article in a way that is inaccurate or inappropriate, you can easily change it back.

  • Simplifying creating links: MediaWiki stores your entire website's content in an internal hypertext database. MediaWiki knows about every page you have and about every link you make. When you are using MediaWiki, you don't have to worry about the location of files or the format of your tags. Simply name the page, and MediaWiki will automatically create a link for you. You can create links within your wiki or to some other wiki as well as to the web world.

  • Simplifying creating new pages: MediaWiki links you to pages that don't yet exist. Click on a link that points to a nonexistent page, and the wiki will ask you for the initial content to be placed in the page. If you write this content, then the wiki will create the page right then and there. All links to that page (not just the one you clicked) will now point to the newly-created page. This is the simplest way of creating a new page in MediaWiki. You don't even have to bother to create the page, save it, and then link it from another page.

  • Simplifying site organization: MediaWiki uses a database in order to manage the hypertext of the site. As a result you can organize your page however you want. Many CMS require you to plan classifications for your content before you actually create it. This can be helpful if you are looking for a rigid structure. With MediaWiki you can organize your page into categories and namespaces if you want. Instead of designing the site structure, many wiki sites just let the structure grow with the content and the links inside their content.

  • Tracking all your stuff: As MediaWiki stores everything in a database that knows about all your links and all your pages it is easy for MediaWiki to show backlinks, a list of all the pages that link to the current page. It also stores your document history so that it can list recent changes to the document and even a list of recent changes to pages that link to the current page.

  • Encouraging discussions: Using the discussion page feature, users can communicate and collaborate on an individual page's content and/or edits. The discussion page, or talk page as it is commonly called, is also editable by users to facilitate communication among the community.