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

Reply
 
Thread Tools
Patch to vbWikiStandard for vb 3.7 & mediaWiki 1.12 Details »»
Patch to vbWikiStandard for vb 3.7 & mediaWiki 1.12
Version: 1.00, by Michael Morris Michael Morris is offline
Developer Last Online: Jun 2009 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 3.7.2 Rating:
Released: 07-09-2008 Last Update: 07-09-2008 Installs: 26
Re-useable Code Code Changes  
No support by the author.

The following is a hack of an existing plugin the author abandoned and which stopped working when vbulletin upgraded to 3.7 and mediaWiki changed to version 1.12 - the two of which happen to be the latest versions of their respective software. The file change below will allow the hack to work with vb 3.7 and Media Wiki 1.12. If you are using older versions of either I would recommend using the elfMage's product in it's original form.

You will need to start by installing MediaWiki seperately and then uploading vbWikiStandard and following its instructions. Here is a link to that product.

https://vborg.vbsupport.ru/showthread.php?t=136242

Note the requirements are a bit higher - mediaWiki 1.12 requires PHP 5. This mod has only been tested on vb 3.7

Once you have completed the instructions of that product open file arcane_vbulletin_core.php - its part of the vbWiki package and find this code:

PHP Code:
// Include vBulletin Engine
    
if ($g_vbWiki_StyleId_Override 0)
    {
        
define('VB_AREA''Forum');
        require_once(
'./includes/init.php');
        
$vbulletin->options['styleid'] = $g_vbWiki_StyleId_Override;
        
$vbulletin->options['allowchangestyles'] = false;                    // ignore user styles
        
$vbulletin->userinfo['styleid'] = 0;
    }
    
    require_once(
'./global.php');
    require_once(
'./includes/functions_login.php');
    require_once(
"./includes/functions.php");                // vbdate
    
require_once("./includes/functions_forumdisplay.php");
    require_once(
"./includes/functions_newpost.php");
    require_once(
"./includes/adminfunctions.php" ); 
Replace with this code.

PHP Code:
    require_once('./global.php');

    if ((empty(
$_SESSION['wsUserID']) || empty($_SESSION['wsUserName']) || empty($_SESSION['wsToken'])) 
        && !empty(
$_COOKIE[$wgDBname.'_'.$wgDBprefix.'UserName']))
    {
        
$_SESSION array_merge$_SESSION$db->query_first("SELECT 
            user_id AS wsUserID,
            user_name AS wsUserName,
            user_token AS wsToken
            FROM "
.$wgDBname.".".$wgDBprefix."user
            WHERE user_name = '"
.addslashes($_COOKIE[$wgDBname.'_'.$wgDBprefix.'UserName'])."' LIMIT 1"));
    } 
I have tested this for 2 weeks on EN World, a site that gets about 22,000 hits / day and it appears stable. We've had a few isolated instances of users stating they are getting logged off, but I believe that's because they are running cookie blockers.

Do not attempt using this hack with vbWikiPro - for optimization I removed the loading of several libraries pro requires. If there is enough interest in this bridge still I will consider wholly rewriting the bridge to tighten up integration further. In the interim though this seems to work.

I will provide what support I can but be warned the original hack has been abandoned and outside the changes I've made in this mod your guess is as good as mine.

Show Your Support

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

Comments
  #22  
Old 07-13-2008, 11:53 AM
tazzarkin tazzarkin is offline
 
Join Date: Nov 2007
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by redlabour View Post
BTW - nice Idea - but in fact that vBWiki is dead i believe this "Bridge" is useless. A Importer from vBWiki -> MediaWiki will make more Sense.
mediawiki 1.12 is still alive. And this is a bridge to vbulletin. I think redlabour is a little confused.

Quote:
Originally Posted by mokonzi View Post
@ redlabour, I'm well aware vbWikiPro is dead, hence my question.
Actually, vbWikiPro is working quite well for me with mw 1.12 + vb 3.7.1 My only problem was with a cookies/login issue, but there is an easy fix on nuhit.com (FIX FOR vbWikiPRO ONLY):

Quote:
Originally Posted by kremer4
Think I got it, edit the file "/vbWiki/vbWiki_Auth.php"

Put // infront of the following lines

$user->logout();
global $wgEnableParserCache, $wgParser, $wgOut, $wgCachePages;

So it should be

//$user->logout();
//global $wgEnableParserCache, $wgParser, $wgOut, $wgCachePages;

Let me know if this works for you. I also made one other change but I don't think it's related. If this does not work then I'll post the other change I made.
However, after using this fix, it doesn't clear the cookies completely and it makes it look like the user is still logged in when he's really not. But it does seem to work other than that.

By the way, I really hope that Michael Morris can make this integration better as he stated up above,
Quote:
Originally Posted by Michael Morris View Post
If there is enough interest in this bridge still I will consider wholly rewriting the bridge to tighten up integration further.
I really hope that you can keep improving this. Thank you again for keeping this alive!! I'm still using vbWikiPro, but I would love to have this as an alternative.
Reply With Quote
  #23  
Old 07-13-2008, 09:11 PM
Arkidas Arkidas is offline
 
Join Date: Sep 2006
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was referring to Simmonds possible fix for vbwiki pro.
Reply With Quote
  #24  
Old 07-14-2008, 10:08 PM
MikeH2911 MikeH2911 is offline
 
Join Date: Apr 2007
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just used this patch with mediawiki 1.12 and vb 3.7.2 forums are working fine, wiki is working fine but any attempts to view the wiki whilst logged in results in me being logged out from both. Any ideas why?
Reply With Quote
  #25  
Old 07-15-2008, 08:37 PM
iRO Wiki iRO Wiki is offline
 
Join Date: Sep 2007
Location: Colorado
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Same thing is happening to me on our test install, logged in on the forums, then if I try going to the wiki, it redirects to the forums and logs me out...
Reply With Quote
  #26  
Old 07-16-2008, 06:37 AM
Michael Morris's Avatar
Michael Morris Michael Morris is offline
 
Join Date: Nov 2003
Location: Knoxville TN
Posts: 774
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cookies must be enabled for this patch to work. I haven't been able to get it to work when cookies are disabled.

The underlying problem is vbulletin stores session information in the database whereas wiki stores it in $_SESSION. vbulletin doesn't even use $_SESSION.
Reply With Quote
  #27  
Old 07-17-2008, 05:27 AM
sinucello sinucello is offline
 
Join Date: Apr 2006
Location: dutch-german border
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,
Quote:
Originally Posted by tazzarkin View Post
By the way, I really hope that Michael Morris can make this integration better as he stated up above,
you`re using a commercial add-on for vBulletin that costs $60 USD and are hoping for an indipendant programmer here on vb.org to fix this product? That doesn`t sound like NuHIT offers a reliable, well supported solution.

At the moment I`m using this solution
http://www.mediawiki.org/wiki/Extens...rs_Integration
which offers no skin support. So vBWiki Pro would be interesting for me but not if I it keeps me from updating MediaWiki and vBulletin because I have to wait ages until they officially support the latest versions.

Maybe someone can comment on this.

Thanks and all the best,
Sacha
Reply With Quote
  #28  
Old 07-17-2008, 06:03 AM
Smitty's Avatar
Smitty Smitty is offline
 
Join Date: Sep 2002
Location: Southern Ohio
Posts: 385
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sinucello View Post
That doesn`t sound like NuHIT offers a reliable, well supported solution.
NuHIT is for all intents and purposes gone. There's still a web site and I *think* they'll still take someones money, but essentially the products have been abandoned. This is no secret and has been discussed in other threads. I bought the pro package quite a while back. It's still working for me.
Reply With Quote
  #29  
Old 07-17-2008, 07:03 AM
sinucello sinucello is offline
 
Join Date: Apr 2006
Location: dutch-german border
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Smitty,

thanks for the info.

best,
Sacha
Reply With Quote
  #30  
Old 07-22-2008, 05:38 PM
iRO Wiki iRO Wiki is offline
 
Join Date: Sep 2007
Location: Colorado
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Michael Morris View Post
cookies must be enabled for this patch to work. I haven't been able to get it to work when cookies are disabled.

The underlying problem is vbulletin stores session information in the database whereas wiki stores it in $_SESSION. vbulletin doesn't even use $_SESSION.
As far as I know, cookies are enabled. The issue is, when we log into the forum, then browse to the wiki, it redirects back to the forum logout page...
Reply With Quote
  #31  
Old 07-29-2008, 12:47 AM
rinkrat's Avatar
rinkrat rinkrat is offline
 
Join Date: Jan 2002
Location: Long Beach
Posts: 530
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works for me thanks
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 07:43 PM.


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.04860 seconds
  • Memory Usage 2,332KB
  • 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
  • (2)bbcode_php
  • (7)bbcode_quote
  • (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
  • (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