Do you want to use vBulletin's user database with your MediaWiki? You might like this.
I have taken Kai Backman's MediaWiki authentication plugin idea, fixed coding errors, and expanded greatly on it.
Working on:
vBulletin 3.5.4 and MediaWiki 1.6.3
Features:
Allows you to run MediaWiki with your vBulletin user database
Disallows users with invalid username characters
Disallows users who are not part of specified usergroups
Sets users to sysop status in MediaWiki if they are part of a specified admin usergroup
Removes users from sysop status in MediaWiki if they no longer are a part of a specified admin usergroup
For same-database setups, allows easy installation
Possible Future Features: These are possible features for inclusion in the how-to in the future. They have not been investigated for their feasibility, but are here to let you know they have been requested and I am thinking about them. If you know how to add the features, please let us know.
No-login required (automatic) integration
Option: User profile field points to, or has option to link to vBulletin profile
To register, link the user to vBulletin's registration script on the login pages
Optional: On boards that already have existing users, somehow have their usernames changed so that they are only alphanumeric. This is required if you wish your users to be able to login and edit the wiki using their vBulletin username. The reason you have to do this is because MediaWiki has some Restrictions on what can go in a page title, and as usernames have to be passed as page titles, they also have to adhere to the same restrictions. If you do not change the usernames, I have included a check to not allow users to login if their username contains non-alphanumeric characters.
Open your wiki/LocalSettings.php file
Insert the following code at the end of the file, before the ?>:
PHP Code:
# vBulletin integration script
require_once("AuthPlugin_vBulletin.php");
// if vBulletin and MediaWiki are not installed on the same database
// change these values to reflect your vBulletin database information
$wgAuth = new AuthPlugin_vBulletin($wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, "vb_");
If you are running vBulletin and MediaWiki in the same database, then it already uses the connection information.
If you are not running vBulletin and MediaWiki in the same database, please change the strings to reflect your vBulletin database information.
In either case, the last value is whatever your vBulletin table prefix is.
Insert this code below the require_once( "includes/DefaultSettings.php" ); at the top of the LocalSettings.php file:
This prevents people from registering new accounts on the wiki, requiring people to register on vBulletin. It also prevents anonymous edits. This code may only work on MediaWiki 1.5.x and above, but I am unsure.
Download the AuthPlugin_vBulletin.php file and put it in your main wiki directory, ie: /wiki/AuthPlugin_vBulletin.php
Please let me know if this was helpful, or if you can expand on this code.
Yes, this works just fine. I am running vB 3.7.2 and MW 1.12.0.
The only thing that I would like to do, is to have it automatically log them in, instead of having them re-login (perhaps use the same cookie as vB?).
Can you make a quick post that goes through exactly the steps you went through to get it set up?On my many attempts the other day I couldn't get it to work. It would be much appreciated.