Electowidget Installation

Below are step-by-step instructions for installing Electowidget at your MediaWiki installation on a UNIX machine running the Bash shell (typical configuration for many Linux hosting providers):

  Download Electowidget   Unpack Electowidget into your extensions directory  $ cd /path/to/mediawiki/extensions $ tar zxvf /path/to/electowidget-0.1.0.tar.gz Note: Please substitute the location in your local installation for the  portion.  Move or symlink it  $ mv Electowidget-0.1.0 Electowidget $ ln -s Electowidget-0.1.0 Electowidget
 * Approach #1 (moving):
 * Approach #2 (symlink):

In order for Electowidget to work with MediaWiki, there is a slight modification that is needed to MediaWiki. Apply the provided patch to your MediaWiki install.

$ cd /path/to/mediawiki $ patch -p0 < extensions/Electowidget/MediaWiki/mediawiki-1.5.1.patch

Note: Please substitute the location in your local installation for the  portion.

Edit LocalSettings.php using your preferred text editor $ $EDITOR LocalSettings.php

Add the following text near/at the end of LocalSettings.php define('ELECTOWIDGET_MAIN_NS', 100); define('ELECTOWIDGET_TALK_NS', 101); define('ELECTOWIDGET_SUBDIR', 'extensions/Electowidget/'); require_once(ELECTOWIDGET_SUBDIR."MediaWiki/ElectoDefaults.php");

Note: 100 and 101 are namespace identifiers which may conflict with other namespace identifiers if you've customized your MediaWiki installation. Please choose unique values for these numbers. Test your installation. Visit a page in the "Election:" namespace, such as "Election:Test". You should get a warning that reads "Empty page. Please edit this page, providing JSON-formatted data about the election you'd like to set up.". If so, congratulations, you've successfully installed Electowidget. 