Difference between revisions of "Electowidget Installation"

From Electowiki
Jump to: navigation, search
(Install instructions)
 
(removing MWLOC env variable)
 
Line 3: Line 3:
 
<ol>
 
<ol>
 
<li>  Download Electowidget </li>
 
<li>  Download Electowidget </li>
<li> Set the MWLOC variable </li>
 
$ export MWLOC=/path/to/mediawiki
 
'''Note:''' Please substitute the location in your local installation for the <code>/path/to/mediawiki</code> portion.
 
 
<li> Unpack Electowidget into your extensions directory </li>
 
<li> Unpack Electowidget into your extensions directory </li>
  $ cd $MWLOC/extensions
+
  $ cd /path/to/mediawiki/extensions
 
  $ tar zxvf /path/to/electowidget-0.1.0.tar.gz
 
  $ tar zxvf /path/to/electowidget-0.1.0.tar.gz
 +
'''Note:''' Please substitute the location in your local installation for the <code>/path/to/mediawiki</code> portion.
 
<li> Move or symlink it </li>
 
<li> Move or symlink it </li>
 
*  Approach #1 (moving):  
 
*  Approach #1 (moving):  
Line 17: Line 15:
 
<li>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.</li>
 
<li>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.</li>
  
  $ cd $MWLOC
+
  $ cd /path/to/mediawiki
  $ patch -p0 < /path/to/mediawiki/extensions/Electowidget/MediaWiki/mediawiki-1.5.1.patch
+
  $ patch -p0 < extensions/Electowidget/MediaWiki/mediawiki-1.5.1.patch
 +
 
 +
'''Note:''' Please substitute the location in your local installation for the <code>/path/to/mediawiki</code> portion.
  
 
<li>Edit LocalSettings.php using your preferred text editor</li>
 
<li>Edit LocalSettings.php using your preferred text editor</li>

Latest revision as of 18:32, 29 October 2005

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.