Electowidget Installation

From Electowiki
Jump to: navigation, search

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):

  1. Download Electowidget
  2. Unpack Electowidget into your extensions directory
  3. $ 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.

  4. Move or symlink it
    • Approach #1 (moving):
    $ mv Electowidget-0.1.0 Electowidget
    
    • Approach #2 (symlink):
    $ ln -s Electowidget-0.1.0 Electowidget
    
  5. 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.
  6. $ 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.

  7. Edit LocalSettings.php using your preferred text editor
  8. $ $EDITOR LocalSettings.php
    
  9. Add the following text near/at the end of LocalSettings.php
  10. 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.

  11. 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.