vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Integration with vBulletin - MediaWiki/vBulletin Single Sign-On (https://vborg.vbsupport.ru/showthread.php?t=191186)

BRotondi 11-27-2008 05:59 AM

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

Big Kahuna 11-27-2008 02:25 PM

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?

BRotondi 11-27-2008 02:35 PM

Which Versions do you use?

Big Kahuna 11-27-2008 03:15 PM

Vb 3.74.1
Mw 1.13.2

BRotondi 11-27-2008 03:53 PM

does not work.... I have the same Versions...

BRotondi 11-27-2008 05:36 PM

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

NoeJeko 12-01-2008 04:07 PM

I am working the issue. Right now I can only claim compatibility with vB 3.6.9-3.7.3 and MW <= 1.12.

BRotondi 12-01-2008 04:23 PM

1001 Thanks! ... hope you dont lose to much time with this...

rlfs 12-05-2008 09:06 PM

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

BRotondi 12-06-2008 04:01 AM

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


All times are GMT. The time now is 10:56 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01357 seconds
  • Memory Usage 1,755KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete