Tuesday, March 23, 2010

Bridging a Website to Media Wiki

Step A : Installing and Configuring the Joomla plugin.

Download and install the Joomla plugin

  1. Install zip file using standard Joomla install
  2. Publish the plugin and configure the plugin as below. Set
    • Directory path: The complete path to your mediawiki folder, eg) /home1/spfschoo/public_html/MEDIAWIKI/
    • Cookie domain: Leave Blank
    • Cookie prefix: The name of your database with a a '_' on the end. Eg) if the database is named "spfschoo_mdw1" then put "spfschoo_mdw1_" in this section.
    • Cookie path: I kept this as root "/".
  3. Change the code in file joomla root/plugins/user/mediawikilogin.php on line 35
    1. Line 35: $salt = 'Give some variable name here'; //CHANGE THE VARIABLE NAME TO $salt= 'wiki' or something

Step B : Installing and Configuring the MediaWiki Extension.

Download the extensions from Mediawiki extension

  1. First download the MediaWiki extension authjoomla2.php
  2. To install the mediawiki extension, copy and paste the authjoomla2.php file to wikiroot/extensions/AuthJoomla2/authJoomla2.php
    Note: I had to create the AuthJoomla2 folder and put the file in there. It wouldn't work otherwise.
  3. Next, download localsettings.php from Mediawiki extension
  4. Open localsettings.php and copy all the code [Press Ctrl-C] and paste[Press Ctrl-V] it into the end of your wiki/LocalSettings.php file
  5. Now, make these changes in your MediaWiki LocalSettings.php:
    • $wgAuthJoomla_security_key = 'CHANGE THIS VARIABLE NAME'; //The variable should have the same value of $salt in Line 35 in Step A -> Step 3
    • $wgAuthJoomla_UseExtDatabase = true;
    • Change the database settings
      $wgAuthJoomla_MySQL_Host = 'localhost'; // Joomla MySQL Host Name.
      $wgAuthJoomla_MySQL_Username = 'spfschoo_jml10'; // Joomla Site MySQL Username.
      $wgAuthJoomla_MySQL_Password = 'GmZ5AOGhxL'; // Joomla Site MySQL Password.
      $wgAuthJoomla_MySQL_Database = 'spfschoo_jml10'; // Joomla Site MySQL Database Name
      Note: these can all be found in the 'configuration.php' file in the website folder.
    • $wgAuthJoomla_domain = 'http://www.YOURWEBSITE.com/'; //location of your Joomla index.php file
      Note: Don't forget the tail '/' after '.com'
  6. Save LocalSettings.php

No comments:

Post a Comment