Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
MediaWiki/vBulletin Single Sign-On Details »
MediaWiki/vBulletin Single Sign-On
Mod Version: 2.2.0, by NoeJeko (Member) NoeJeko is offline
Developer Last Online: Apr 2011 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.7.x Rating: (13 votes - 4.92 average) Installs: 110
Released: 18 Sep 2008 Last Update: 02 May 2009 Downloads: 824
Not Supported Uses Plugins Additional Files  

Overview:
This hack provides single sign-on capability for MediaWiki using your vBulletin users. You must ensure your cookie path in Admin CP is set to '/' for this to work. Also, I have not tested this if your wiki and your forums are on different subdomains - but as long as your have your cookie domain set properly it *should* work. This is not a user bridge - it is a complete single sign-on using your vBulletin user repository.

The install process has been extremely simplified in version 2.x of this product. You only have to edit LocalSettings.php, import a product, and change a setting in your Admin Control Panel. It's been completely packaged as a vBulletin product - unlike the previous hacked up version, heh. I didn't originally plan to release this so I designed it so it worked - not so it could be redistributed. I searched high and low for a functional MediaWiki bridge - almost bought NuHIT's product, and then realized it had been abandoned for over a year.

This hack no longer requires an edit to class_core.php.

I'll do my best to support it, but I can make no promises.

This thread is for discussion of this mod on vB 3.7.x. For vB 3.8.x, please use the MediaWiki/vBulletin Single Sign-On 3.8 thread

Demo of plugin in action: MyMMOGames - Multiplayer Gaming and Media Community

Also, if you use memcached - ensure you do not cache sessions. If you do, restart it at least once a week. If you don't, you'll end up with invalid session errors out of MediaWiki.

Requirements:
MediaWiki Version: 1.11.0-1.14.0
vBulletin Version: 3.6.9-3.8.2

Features:
- Provides single sign on capability between vBulletin and Mediawiki. vBulletin user repository is used
- Configurable sysop/bureaucrat groups
- Configurable disallowed user groups
- Configurable "Who's Online" display
- Counts users viewing wiki in vBulletin's "Who's Online"

Installation/Upgrade:
Please read the included "readme.txt" file in the "docs (do not upload)" folder.

Options:
Admin Control Panel->vBulletin Options->MMOG Wiki Options

Change Log:
1.0.0.0 - Sep 18, 2008
- Initial Release

1.0.3.0 - Sep 29, 2008
- Bugfix: Incorrect redirects for login/logout

2.0.0.0 - Sep 30, 2008
- Feature: Streamlined installation procedure
- Feature: Wiki path set in ACP
- Bugfix: Forum paths no longer hardcoded

2.1.0 - Oct 4, 2008
- Feature: ACP option to use MediaWiki Short URLs
- Feature: ACP option to set sysop groups
- Feature: ACP option to set bureaucrat groups
- Feature: ACP option to disallow login to certain groups
- Feature: ACP option to change WOL display text

2.2.0 - May 1, 2005
- Bugfix: Users are not logged out when logging out of the forum
- Bugfix: No longer requires modification to class_core.php
- Feature: Mediawiki 1.13.0+ supported (verified on 1.14.0 also)

If you like it, please click "mark as installed" The more people that use this, the more time I will make to try and support/update it.

Been pulling your hair out looking for this as long as I have? Nominate it for Mod of the Month =]

AuthPlugin was inspired by and modified from this existing MediaWiki Extension:

http://www.mediawiki.org/wiki/Extension:QISSingleSignOn

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #106  
Old 16 Oct 2008, 19:02
Veridiac Veridiac is offline
 
Join Date: Oct 2006
I think I have it working, in addition to modifying the hook to UserLoadFromSession, and adding &$result to the function prototype I did the following:

Changed the User::newFromName to initialize the $user object itself without replacing it... when it was replaced the calling function appeared to still have the old $user object which was giving an error.

In doing that I first load defaults, then set the name, set mFrom to name, call load, check if the user has a valid ID and if not add to the database, and then continue on.

In addition, I Found that the sysop groups weren't being removed when I removed someone from admin group so I added $user->removeGroup for both before then adding it again (or not) depending on the users vb group.

I'm not totally familiar with mediawiki's authorization process (I just installed it actually) so some of this may be redundant, or worse something could be missing....

At any rate it appears to be working if I find any problems I'll post here, I'm attaching my copy of AuthPlugin_vBSSO.php if anyone wants to use it.


Edit: Not working at this time, something is causing edit tokens (and maybe more) to not be correct during POST requests, still investigating
Attached Files
File Type: zip AuthPlugin_vBSSO.zip (3.8 KB, 26 views)

Last edited by Veridiac; 16 Oct 2008 at 20:06.
Reply With Quote
  #107  
Old 16 Oct 2008, 20:57
BRotondi's Avatar
BRotondi BRotondi is offline
 
Join Date: Sep 2008
ey wow! Great Work!! Thanks in the name of the vb/Wiki-Community
(even I cannot test it myself, since still 1.9)

Bruno
Reply With Quote
  #108  
Old 17 Oct 2008, 04:03
carrlos's Avatar
carrlos carrlos is offline
 
Join Date: Nov 2006
Originally Posted by shikareez View Post
From MW 1.13+ the "AutoAuthenticate" Hook is renamed to "UserLoadFromSession". So just follow all the instruction and at all, just edit the hook name to "UserLoadFromSession" at near the end of AuthPlugin_vBSSO.php.
Thanks a million shikareez!! That did the trick!!

From this point on I solemnly swear to read all posts on all pages before installing any add-on!! I actually had 1.12 installed then upgraded before installing this!!!

Edit:
Is the link in Who's Online suppose to go to a download of the opensearch_desc.php file?????



http://www.androidmodding.com/wiki

Last edited by carrlos; 17 Oct 2008 at 04:24.
Reply With Quote
  #109  
Old 17 Oct 2008, 11:01
GriZzm0 GriZzm0 is offline
 
Join Date: Apr 2006
Originally Posted by carrlos View Post
Thanks a million shikareez!! That did the trick!!

From this point on I solemnly swear to read all posts on all pages before installing any add-on!! I actually had 1.12 installed then upgraded before installing this!!!

Edit:
Is the link in Who's Online suppose to go to a download of the opensearch_desc.php file?????



http://www.androidmodding.com/wiki
It's not like you'll download the "real" opensearch_desc.php. Your browser asks if you want to download it as the php script change the content header to xml as the output is an xml file.
Reply With Quote
  #110  
Old 17 Oct 2008, 14:18
carrlos's Avatar
carrlos carrlos is offline
 
Join Date: Nov 2006
Originally Posted by GriZzm0 View Post
It's not like you'll download the "real" opensearch_desc.php. Your browser asks if you want to download it as the php script change the content header to xml as the output is an xml file.
So how do I remove the link or change the link to go to my wiki instead???
Reply With Quote
  #111  
Old 17 Oct 2008, 19:06
Veridiac Veridiac is offline
 
Join Date: Oct 2006
I think I discovered my problem, I run vbDrupal, and drupal uses "user" php sessions, but mediawiki uses file, and apparently loading vbulletin's core stuff to get the authentication from the cookies will sometimes (but apparently not always...) cause drupal to start a session preventing mediawiki from opening the existing session (containing important edit tokens, etc)

Sooo for now I think I'm going to have to use a regular authentication plugin forcing users to sign in twice Nice work though, maybe eventually I'll track down what makes drupal start the session, or try again when I get around to upgrading vbdrupal.
Reply With Quote
  #112  
Old 18 Oct 2008, 01:16
azn_romeo_4u azn_romeo_4u is offline
 
Join Date: Feb 2006
Originally Posted by shikareez View Post
From MW 1.13+ the "AutoAuthenticate" Hook is renamed to "UserLoadFromSession". So just follow all the instruction and at all, just edit the hook name to "UserLoadFromSession" at near the end of AuthPlugin_vBSSO.php.
Thank you worked perfectly
Reply With Quote
  #113  
Old 18 Oct 2008, 14:31
Pavlus's Avatar
Pavlus Pavlus is offline
 
Join Date: Feb 2008
So theres no solution for 1.13 for now? I tried to change this hook, but its not working.

Last edited by Pavlus; 18 Oct 2008 at 16:43.
Reply With Quote
  #114  
Old 18 Oct 2008, 16:45
thunder28 thunder28 is offline
 
Join Date: Sep 2007
Hi

i have this problem:
when i will logged in to the wiki, i became this error

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

On the Loginsite i have this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

xxxx is my homepage path.

sorry for my bad englisch.

greetz
thunder28
Reply With Quote
  #115  
Old 23 Oct 2008, 17:52
Slewey Slewey is offline
 
Join Date: Apr 2008
Real name: Wesley
Originally Posted by shikareez View Post
From MW 1.13+ the "AutoAuthenticate" Hook is renamed to "UserLoadFromSession". So just follow all the instruction and at all, just edit the hook name to "UserLoadFromSession" at near the end of AuthPlugin_vBSSO.php.
Had the same problem and this worked great for me! Thanks for sharing

And thanks for the bridge, exactly what I was looking for! Keep up the good work
Reply With Quote
  #116  
Old 23 Oct 2008, 18:06
NoeJeko NoeJeko is offline
 
Join Date: Sep 2007
Location: Silicon Valley, CA
Real name: Paul Stout
Hey guys - I'll try to get a version detection built in and automate this based upon version within the next couple of days. Thanks for pointing it out as we're not currently using MW 1.13.

Originally Posted by thunder28 View Post
Hi

i have this problem:
when i will logged in to the wiki, i became this error

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

On the Loginsite i have this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

xxxx is my homepage path.

sorry for my bad englisch.

greetz
thunder28
It seems like you didn't set one of the directives in the Admin CP properly - or you didn't define VB_SYSTEM_PATH in LocalSettings.php
Reply With Quote
  #117  
Old 01 Nov 2008, 22:10
carrlos's Avatar
carrlos carrlos is offline
 
Join Date: Nov 2006
Originally Posted by carrlos View Post
Is the link in Who's Online suppose to go to a download of the opensearch_desc.php file?????



http://www.androidmodding.com/wiki
Bump!!!!!
Reply With Quote
  #118  
Old 02 Nov 2008, 01:31
figu120 figu120 is offline
 
Join Date: Feb 2008
Real name: Andres felipe Vasquez
thanks
Reply With Quote
  #119  
Old 10 Nov 2008, 09:09
petchat petchat is offline
 
Join Date: Oct 2008
This is excellent, thanks so much!
Reply With Quote
  #120  
Old 12 Nov 2008, 19:15
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Real name: Mark Daniel Martinez
Originally Posted by Veridiac View Post
I think I have it working, in addition to modifying the hook to UserLoadFromSession, and adding &$result to the function prototype I did the following:

Changed the User::newFromName to initialize the $user object itself without replacing it... when it was replaced the calling function appeared to still have the old $user object which was giving an error.

In doing that I first load defaults, then set the name, set mFrom to name, call load, check if the user has a valid ID and if not add to the database, and then continue on.

In addition, I Found that the sysop groups weren't being removed when I removed someone from admin group so I added $user->removeGroup for both before then adding it again (or not) depending on the users vb group.

I'm not totally familiar with mediawiki's authorization process (I just installed it actually) so some of this may be redundant, or worse something could be missing....

At any rate it appears to be working if I find any problems I'll post here, I'm attaching my copy of AuthPlugin_vBSSO.php if anyone wants to use it.


Edit: Not working at this time, something is causing edit tokens (and maybe more) to not be correct during POST requests, still investigating
Seems to have fixed things for me as well.
__________________
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 21:43.

Layout Options | Width: Wide Color: