Extension:AuthJoomla

Introduction
Authenticate users AuthJoomla1.5 between MediaWiki and joomla 1.5.x; Joomla and Mediawiki should be installed on the 'same' host

Comments & Feedback
Comments & Feedback discussion page

To have a correct behavior, with the following extension as is, I have done the following adaptation : To manage users through Joomla : Install the dedicated extension from the MediaWiki Website => http://www.mediawiki.org/wiki/Extension:AuthJoomla And make the following adaptation

1 - Setup the correct data to your Joomla database and provide a correct path to Joomla in LocalSettings.php

$wgAuthJoomla_Path            = $IP.'/Relative Path to Joomla Directory/'; $IP the absolute Wiki Path

2 - In the file AuthJoomla.php, make the followig correction in the method => private function connectToDB : $db = & Database :: newFromParams(       $GLOBALS['wgAuthJoomla_MySQL_Host'],        $GLOBALS['wgAuthJoomla_MySQL_Username'],        $GLOBALS['wgAuthJoomla_MySQL_Password'],        $GLOBALS['wgAuthJoomla_MySQL_Database'], $failFunction = false, $flags = 0, $tablePrefix = 'Joomla' );

3 - In the MediaWiki file => RootMediaWiki/include/db/Database.php Line 309 => Method newFromParams, make the following correction for the constructor calling :

Add => " $failFunction = false, $flags = 0, $tablePrefix " in the argument as following

/**    * Same as new Database( ... ), kept for backward compatibility * @param $server String: database server host * @param $user String: database user name * @param $password String: database user password * @param $dbName String: database name * @param failFunction * @param $flags */   static function newFromParams( $server, $user, $password, $dbName, $failFunction = false, $flags = 0, $tablePrefix ) {       return new Database( $server, $user, $password, $dbName, $failFunction, $flags, $tablePrefix Bold text); }

4 - In the MediaWiki file => RootMediaWiki/include/db/Database.php Line 296 =>  Method _constructor

/** Get the default table prefix*/ '''if ( $tablePrefix == 'Joomla' ) { $this->mTablePrefix = ''; } else'''if ( $tablePrefix == 'get from global' ) { $this->mTablePrefix = $wgDBprefix; } else { $this->mTablePrefix = $tablePrefix; }

After that everything seems correct and I can also wrap the WIKI inside Joomla so I have a coherent graphic interface.

Settings
In LocalSettings.php add the following code: