Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons

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.7.x Rating:
Released: 09-17-2008 Last Update: 05-01-2009 Installs: 112
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.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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #152  
Old 11-27-2008, 05:59 AM
BRotondi BRotondi is offline
 
Join Date: Sep 2008
Location: Zurich
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did all you said but still have the same problem... Are you sure it works 100%? Please check the following:
1. login from vB -> check at wiki
2. logout from wiki -> go back and see if inside wiki really logged out
3. login from Wiki -> check at vB and wiki

If it works for you I'm really curious what vB changed from 3.72 to 3.74 ...

Bruno
Reply With Quote
  #153  
Old 11-27-2008, 02:25 PM
Big Kahuna's Avatar
Big Kahuna Big Kahuna is offline
 
Join Date: Feb 2002
Location: SE Texas
Posts: 182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK -- I'm really really confused as to where to go from here as this thread has jumped all over and I can't figure out the good information from the bad information.

What I've done so far is to follow the instruction in the upload:
Code:
STEP 1: Upload the contents of the "upload" directory into your wiki root directory.  Edit
    LocalSettings.php find this line:

        require_once( "$IP/includes/DefaultSettings.php" );

    After it, add these two lines:

        define( VB_SYSTEM_PATH, '/var/www/html/forum' );
        require_once( "$IP/includes/AuthPlugin_vBSSO.php" ); 

    VB_SYSTEM_PATH should be the full filesystem path to your vBulletin installation.  If
    you don't know the full path, change to your forum home directpry and type pwd in a shell.
    It will print the current directory.  Ensure you do not add a trailing slash to VB_SYSTEM_PATH!

    You no longer have to edit anything in AuthPlugin_vBSSO.php or Userlogin.php

    If you have anything in LocalSettings for $wgGroupPermissions['*']['createaccount'], change
    all instances of 'createaccount' to false.  If you don't have anything in your
    LocalSettings.php for 'createaccount', add this line after the two you just added:

        $wgGroupPermissions['*']['createaccount'] = false;

    This is important so that new users create a forum account instead of a wiki account.  If
    they create a wiki account by mistake, they will not be able to log in.
    
STEP 2: Edit class_core.php (found in <forumhome>/includes).  Why?  vBulletin will mangle a security
    token needed by MediaWiki.  If you do not make this change, your users will not be able to
    edit your wiki.  It's really simple and it's worked across vB 3.6.9, 3.7.1, and 3.7.3.

    In class_core.php, search for this block of code:

                // reverse the effects of magic quotes if necessary
                if (function_exists('get_magic_quotes_gpc') AND get_magic_quotes_gpc())
                {
                        $this->stripslashes_deep($_REQUEST); // needed for some reason (at least on php5 - not tested on php4)
                        $this->stripslashes_deep($_GET);
                        $this->stripslashes_deep($_POST);
                        $this->stripslashes_deep($_COOKIE);

                        if (is_array($_FILES))
                        {
                                foreach ($_FILES AS $key => $val)
                                {
                                        $_FILES["$key"]['tmp_name'] = str_replace('\\', '\\\\', $val['tmp_name']);
                                }
                                $this->stripslashes_deep($_FILES);
                        }
                }


    Replace it with this:

                // reverse the effects of magic quotes if necessary
                if (function_exists('get_magic_quotes_gpc') AND get_magic_quotes_gpc())
                {
                        if ( THIS_SCRIPT != 'wiki' ) {
                                // MMOG Wiki hack
                                $this->stripslashes_deep($_REQUEST); // needed for some reason (at least on php5 - not tested on php4)
                                $this->stripslashes_deep($_GET);
                                $this->stripslashes_deep($_POST);
                                $this->stripslashes_deep($_COOKIE);

                                if (is_array($_FILES))
                                {
                                        foreach ($_FILES AS $key => $val)
                                        {
                                                $_FILES["$key"]['tmp_name'] = str_replace('\\', '\\\\', $val['tmp_name']);
                                        }
                                        $this->stripslashes_deep($_FILES);
                                }
                        }
                }

STEP 3: Import the product product-mmog_wiki.xml via your Admin CP.  This is the hack that shows the users in
    "Who's Online" instead of "Unknown Location" and also configures your login/wiki paths.

    Go to your vBulletin Options and look for MMOG Wiki Options.  Change "Wiki Path" to the URL path of your wiki.
    If your wiki is on a different subdomain, you need to put the full URL of your wiki path minus the trailing
    slash.  Otherwise, just a relative directory is fine.

So what do I need to do to get this to work?


1. replace modified class_core.php back with the original unmodified version?

2. Edited the AuthPlugin_vBSSO.php file from:
$wgHooks[AutoAuthenticate ][] = 'vBSSOAutoAuth';
to
$wgHooks['UserLoadFromSession'][] = 'vBSSOAutoAuth';

3. edited User.php as stated in Post #143 (which mediawiki or vbulletin?)

4. Do I make any changes in my LocalSettings.php -- beyond what I did in the instructions?


Am I missing anything on what I need to do to take this from where doing everything in the readme.txt to getting this to work?
Reply With Quote
  #154  
Old 11-27-2008, 02:35 PM
BRotondi BRotondi is offline
 
Join Date: Sep 2008
Location: Zurich
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Which Versions do you use?
Reply With Quote
  #155  
Old 11-27-2008, 03:15 PM
Big Kahuna's Avatar
Big Kahuna Big Kahuna is offline
 
Join Date: Feb 2002
Location: SE Texas
Posts: 182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Vb 3.74.1
Mw 1.13.2
Reply With Quote
  #156  
Old 11-27-2008, 03:53 PM
BRotondi BRotondi is offline
 
Join Date: Sep 2008
Location: Zurich
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

does not work.... I have the same Versions...
Reply With Quote
  #157  
Old 11-27-2008, 05:36 PM
BRotondi BRotondi is offline
 
Join Date: Sep 2008
Location: Zurich
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

With this versions it is possible to login via vB in Wiki AND vB, but as written above you cannot logout both or login through Wiki.

NoeJeko will try to solve the problem. We need some patience...

Bruno
Reply With Quote
  #158  
Old 12-01-2008, 04:07 PM
NoeJeko NoeJeko is offline
 
Join Date: Sep 2007
Location: Silicon Valley, CA
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am working the issue. Right now I can only claim compatibility with vB 3.6.9-3.7.3 and MW <= 1.12.
Reply With Quote
  #159  
Old 12-01-2008, 04:23 PM
BRotondi BRotondi is offline
 
Join Date: Sep 2008
Location: Zurich
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1001 Thanks! ... hope you dont lose to much time with this...
Reply With Quote
  #160  
Old 12-05-2008, 09:06 PM
rlfs rlfs is offline
 
Join Date: Dec 2008
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Check the MediaWiki 1.13.2 RELEASE-NOTES file.

* AutoAuthenticate hook renamed to UserLoadFromSession

I had to change that hook in includes/AuthPlugin_vBBSSO.php below:

//$wgHooks['AutoAuthenticate'][] = 'vBSSOAutoAuth';
$wgHooks['UserLoadFromSession'][] = 'vBSSOAutoAuth';

Otherwise Single-Signon did not work with MediaWiki 1.13.2.

FYI for y'all.
Rick
Reply With Quote
  #161  
Old 12-06-2008, 04:01 AM
BRotondi BRotondi is offline
 
Join Date: Sep 2008
Location: Zurich
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your feedback. This is written above, but you still will not be able to
1. logout from wiki -> go back and see if inside wiki really logged out
2. login through Wiki -> check at vB and wiki

Or does it work on your side?

Bruno
Reply With Quote
Reply

Thread Tools

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 05:23 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.09339 seconds
  • Memory Usage 2,305KB
  • Queries Executed 25 (?)
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
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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_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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete