Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
MediaWiki/vBulletin Single Sign-On Details »»
MediaWiki/vBulletin Single Sign-On
Version: 2.2.0, by NoeJeko NoeJeko is offline
Developer Last Online: Apr 2011 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 3.8.x Rating:
Released: 05-06-2009 Last Update: Never Installs: 115
Uses Plugins
Additional Files  
No support by the author.

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.8.x. For vB 3.7.x, please use the MediaWiki/vBulletin Single Sign-On 3.7 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

File Type: zip mmog_wiki_v2.2.0.zip (9.1 KB, 1011 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
Wired1

Comments
  #42  
Old 07-04-2009, 09:24 PM
ndahiya ndahiya is offline
 
Join Date: Aug 2004
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
how do i disable session caching in memcached? not sure if there is a flag, or does it have to be recompiled?

i am currently using the version originally released for 3.7, but with the mods discussed in the thread, so think it is the same as this version.

ndahiya
Reply With Quote
  #43  
Old 07-09-2009, 03:29 AM
raisun raisun is offline
 
Join Date: Dec 2004
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm beating my head against my desk and am hoping for some help from anyone (Im more a hack than a developer, just FYI)

I've got the mod installed and think it works great! I'm still in testing for my wiki, but here is my problem: I've set wiki path in admincp to be "../info," my vb install is www.mouseinfo.com/forums and my wiki install is www.mouseinfo.com/info; should work. However, when i try to log in from the wiki side vb authenticates just fine, but the redirect URL is: http://www.mouseinfo.com/forums/logi....php/Main_Page

Any thoughts where that is coming from?

Thanks!
Reply With Quote
  #44  
Old 07-09-2009, 06:10 AM
Peter Walker Peter Walker is offline
 
Join Date: Oct 2005
Location: Germany
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had a quick look at your website, but without signing up for your forum, it does not look like I can view your wiki.

What I did notice is that you are not using short URLs on your wiki so maybe you should set that up first (is not that difficult to setup).

e.g. http://www.mouseinfo.com/info/Main_Page

I suggest you change your setup to use http://www.mouseinfo.com/wiki/Main_Page until you get that working properly and then experiment with using /info instead.

On my forum, I am using /wiki as my wiki directory with short names (wiki is installed in /w and then redirects to /wiki as per instructions for short URLs).

In admincp, I have set http://www.rifeforum.com/wiki as the Wiki Path with short URLs and defined group 6 for the admin group (default setting). Apart from uploading the code, not much more to set in vb.

The most important settings are in the wiki directory file: LocalSettings.php

Make sure that "define( VB_SYSTEM_PATH," points to the full path on the server (not the URL). and that you have the permissions correct:

$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*' ]['edit'] = false;
$wgGroupPermissions['*' ]['createpage'] = false;
$wgGroupPermissions['*' ]['createtalk'] = false;
$wgGroupPermissions['user']['edit'] = true;

and also check your $wgScriptPath

In your case, should be set to
$wgScriptPath = "/info";

I hope this helps.

Peter
Reply With Quote
  #45  
Old 07-09-2009, 02:18 PM
raisun raisun is offline
 
Join Date: Dec 2004
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Peter. I did have my localsettings.php file set up as you suggest, I'm wondering actually if the redirect URL might be cached somewhere (i moved my wiki from /info/wiki to /info, and everything was fine except the redirect on the login)

I'll keep experimenting. I was playing with short urls yesterday but had some issues so I'll have to keep playing with that...
Reply With Quote
  #46  
Old 07-09-2009, 05:42 PM
NoeJeko NoeJeko is offline
 
Join Date: Sep 2007
Location: Silicon Valley, CA
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by alanhoskins View Post
Any idea?
Hi, sorry for the late reply; I've been out of town and swamped with work. You need to either disable magic_quotes_gpc in php.ini or make the edit to .htaccess that's described in the instructions file.
Reply With Quote
  #47  
Old 07-09-2009, 05:48 PM
NoeJeko NoeJeko is offline
 
Join Date: Sep 2007
Location: Silicon Valley, CA
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Also, a reminder to all:

I do my best to come here and answer support requests, but this mod is not supported. This doesn't mean I don't care about your problems, it just means I'm very busy as a full-time web architect, full-time business management student, and full-time startup business owner.

I use this mod for clients when I do contracting work and, if an issue comes up during an implementation, that's what drives my updates here. To date I've had one person donate towards the development of this mod - and I greatly appreciate that person - but it's a testament to how much I don't make by maintaining this.

I say this not to make you feel sorry for me - but I've noticed some people getting quite irritated if they don't get a *timely* response from me on issues (both in thread and via PM). I never promised to answer your questions but I do my best to provide support as time permits. Those I've had the time to personally help with their instances can probably tell you that as long as I have time, I don't mind helping.
Reply With Quote
  #48  
Old 07-09-2009, 06:38 PM
Peter Walker Peter Walker is offline
 
Join Date: Oct 2005
Location: Germany
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Peter Walker View Post
I do have one problem, which should be easy to solve, yet would appreciate any ideas as to how best to implement it.

As I also have vBadvanced CMPS v3.1.0 installed on my forum, people why type in www.rifeforum.com or www.rifewiki.org will both land on the CMPS page of my forum.

I need some php code that will recognise when someone has called the rifewiki.org domain and automatically redirect them to www.rifewiki.org/wiki while those who used www.rifeforum.com are left where they are in the CMPS. Calls to www.rifewiki.org/forum need to be left unchanged.

Is anyone here up to the task and can post the code here?
As there has been no reply to this, obviously nobody has worked out how to do it.

I have been trying a number of things and have finally found an answer. It involves a minor change to the cmps_index.php file, which is normally renamed to index.php.
What this code does is that if someone uses the www.rifewiki.org domain, the client is automatically redirected to www.rifewiki.org/wiki/ otherwise the cmps page is displayed.

Find:
Code:
error_reporting(E_ALL & ~E_NOTICE);
define('THIS_SCRIPT', 'adv_index');
define('VBA_PORTAL', true);
define('VBA_SCRIPT', 'CMPS');
Above this, insert:
Code:
if (strpos(" ". $_SERVER["HTTP_HOST"], "rifewiki.org")>0){
print '<META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://www.rifewiki.org/wiki/">' ;
}else{
Exchange "rifewiki.org" for the domain to be redirected. This will catch "rifewiki.org", "www.rifewiki.org", etc.

Find at the end of the file:
Code:
?>
Above this, insert:
Code:
}
Save the file and upload to your server.

Example:
http://www.rifeforum.com shows the cmps
http://www.rifewiki.org now redirects to http://www.rifewiki.org/wiki/
That's all.

If anyone knows an even better way of doing this, please post it here.

Regards

Peter
Reply With Quote
  #49  
Old 07-11-2009, 01:28 AM
Mimirswell Mimirswell is offline
 
Join Date: Mar 2006
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed this on a clean installation of 3.8.3 vbulletin and 1.15 Mediawiki and while everything is working, I cannot logout of either vb or wiki. The page generated is:

and the error generated is:

Quote:
Connection Interrupted

The connection to the server was reset while the page was loading.
In addition, attempting to log in on the mediawiki site while correctly logging you in to the forums, upon redirection to the wiki, you are not logged in. Logging into vbulletin functions fine.

Anyone have a suggestion on how to resolve this?
Reply With Quote
  #50  
Old 07-11-2009, 09:37 AM
Peter Walker Peter Walker is offline
 
Join Date: Oct 2005
Location: Germany
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had these problems as well. They were caused by corrupted cookies and the best way of solving them is to delete the cookies related to your forum. After that, the problem should be solved.

As regards logging in, I noticed that it is often best to login on the forum and then switch over to the wiki. Logging in on the Wiki page does not always work.

I put together instructions on how to do this on the main page of my own Wiki which might help you, too.

I hope this helps
Reply With Quote
  #51  
Old 07-11-2009, 05:05 PM
NoeJeko NoeJeko is offline
 
Join Date: Sep 2007
Location: Silicon Valley, CA
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The issue with logging into the wiki first lies in MediaWiki's cache as far as I can tell. I've seen this on a few boards that I've installed this hack -- it's not that you're not logged in (in most cases) it's that mediawiki is showing a cache of an unlogged in page. As soon as you click to another page or perform an action that requires authentication (editing, etc) the wiki usually starts showing your login status.

For the rifeforum.com/rifeforum.org use case, you cannot achieve SSO using this hack across two different domains. It's just how it works - the cookies are not readable across domains. You will need some sort of federated authorization token to achieve this (i.e. SAML tokens or OpenID). You can achieve it with subdomains (i.e. forum.rifeforums.com, wiki.rifeforums.com, etc) but I have not tested this use case and it may prove buggy.

Regarding the vBa CMPS use cases - while I've used this successfully on forums running vBa (see: http://community.ingres.com) I cannot guarantee compatibility with any other installed products. The permutations of hacks is exponential and there's no way I can reasonably test against everything out there =[

Peter Walker brings up a good point. In troubleshooting any web application your first course of action should be to clear your browser's cache and cookies (much like how restarting Windows solves 90% of your problems). If I'm asked for support my first question is always "did you clear your cache and cookies?" Also, try it on different browsers; the issues you're having could be related to a specific browser. IE, FireFox, Safari, Opera, and Chrome should always be used to test since they represent the lion's share of the market.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 11:35 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09646 seconds
  • Memory Usage 2,360KB
  • Queries Executed 28 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete