Thread: Integration with vBulletin - MediaWiki/vBulletin Single Sign-On
View Single Post
  #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
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01166 seconds
  • Memory Usage 1,791KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete