Electowidget Installation
From Electowiki
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
- Move or symlink it
- 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.
- Edit LocalSettings.php using your preferred text editor
- Add the following text near/at the end of LocalSettings.php
- 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.
$ 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 /path/to/mediawiki portion.
$ mv Electowidget-0.1.0 Electowidget
$ ln -s Electowidget-0.1.0 Electowidget
$ 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 /path/to/mediawiki portion.
$ $EDITOR 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.

