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
  #52  
Old 08-27-2008, 08:41 AM
ericdesmontagne ericdesmontagne is offline
 
Join Date: Mar 2007
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ericdesmontagne View Post
Hello, i'd like to use vbwikiskin skin as defalut skin... but is doesn't work very well
In localsetting.php :
I have : $wgDefaultSkin = 'vbwikiskin';
In my file VbWikiSkin.php :
I have : $this->skinname = 'vbwikiskin';
But still the old skin you can see here : http://www.baldursgateworld.com/wiki/
An idee ? Thanks
(media wiki 1.11 and vb 3.7.2 PL3)
Nobody as any idea or information about this ? Do you know a good forum about mediawiki ? I can't find it :'(
:erm:
Reply With Quote
  #53  
Old 08-31-2008, 04:55 PM
chris1979 chris1979 is offline
 
Join Date: Oct 2006
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does MediaWiki and Vbulletin need to be in the same database for this to work? I am getting a database error message:

MySQL Error : SELECT command denied to user 'nlpc'@'localhost' for table 'wiki_user'
Reply With Quote
  #54  
Old 09-07-2008, 10:46 AM
chris1979 chris1979 is offline
 
Join Date: Oct 2006
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can anyone help?
Reply With Quote
  #55  
Old 11-16-2008, 07:05 PM
Lord Doys Lord Doys is offline
 
Join Date: May 2003
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Morris

i got it to work with vbWikiPro on vb 3.7.4 vbwiki_pro 1.3 with MW 1.13.2

used your solution replacing the text in arcane_vbulletin_core.php.

When you put $wgShowExceptionDetails = true; at the bottom of your localsettings.php it gives a stacktrace on what is wrong.

example:
MediaWiki internal error.
Original exception: exception 'MWException' with message 'Detected bug in an extension! Hook vbWiki_GetLocalURL_Hook failed to return a value; should return true to continue hook processing or false to abort.' in /srv/www/birthright.net/brwiki/includes/Hooks.php:137

so all i did was give the functions vbWiki_GetLocalURL_Hook and vbWiki_PersonalUrls_Hook which are both in vbwiki_hooks.php

and voila.. that did the job for me

see it working are http://www.birthright.net/brwiki/ind...pecial:Version

cheers
Arjan
Reply With Quote
  #56  
Old 11-16-2008, 07:19 PM
hollosch's Avatar
hollosch hollosch is offline
 
Join Date: Nov 2005
Location: Germany
Posts: 131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lord Doys View Post
Morris

i got it to work with vbWikiPro on vb 3.7.4 vbwiki_pro 1.3 with MW 1.13.2

used your solution replacing the text in arcane_vbulletin_core.php.

When you put $wgShowExceptionDetails = true; at the bottom of your localsettings.php it gives a stacktrace on what is wrong.

example:
MediaWiki internal error.
Original exception: exception 'MWException' with message 'Detected bug in an extension! Hook vbWiki_GetLocalURL_Hook failed to return a value; should return true to continue hook processing or false to abort.' in /srv/www/birthright.net/brwiki/includes/Hooks.php:137

so all i did was give the functions vbWiki_GetLocalURL_Hook and vbWiki_PersonalUrls_Hook which are both in vbwiki_hooks.php

and voila.. that did the job for me

see it working are http://www.birthright.net/brwiki/ind...pecial:Version

cheers
Arjan
Can you tell us how you got it to work for non-experts, step-by-step?
Reply With Quote
  #57  
Old 11-16-2008, 07:27 PM
Lord Doys Lord Doys is offline
 
Join Date: May 2003
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sure

open vbWiki_hooks.php

find

PHP Code:
    //vbWikiDebug("vbWiki_PersonalUrls_Hook() userinfo['username'] = '" . $userinfo['username'] . "'");
    
if ($userinfo)
    {
        if (
$userinfo['userid'] != 0)        // only for registered users
            
$personal_urls['userpage']['text'] = $userinfo['username'];
    }
}

function 
vbWiki_GetLocalURL_Hook( &$title, &$url$query 
and replace by:

PHP Code:
    //vbWikiDebug("vbWiki_PersonalUrls_Hook() userinfo['username'] = '" . $userinfo['username'] . "'");
    
if ($userinfo)
    {
        if (
$userinfo['userid'] != 0)        // only for registered users
            
$personal_urls['userpage']['text'] = $userinfo['username'];
    }
    return 
true;
}

function 
vbWiki_GetLocalURL_Hook( &$title, &$url$query 

and find:

PHP Code:
        $talkurl vbWiki_Get_Talk_Page$title->getText(), 'user' );
        if (
$talkurl && ($talkurl != ""))
            
$url $talkurl;
    }

replace by:

PHP Code:
        $talkurl vbWiki_Get_Talk_Page$title->getText(), 'user' );
        if (
$talkurl && ($talkurl != ""))
            
$url $talkurl;
    }
return 
true;


so basically i only added return true; at the end of the two functions vbWiki_GetLocalURL_Hook and vbWiki_PersonalUrls_Hook just before their closing tag } (approx line number 54 an 121)

hope this helps

cheers
Arjan
Reply With Quote
  #58  
Old 11-16-2008, 07:58 PM
hollosch's Avatar
hollosch hollosch is offline
 
Join Date: Nov 2005
Location: Germany
Posts: 131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,
i will test this. it means, that you don't use the patch ??? (i think the patch is only for vbwiki standard???)

thx
hollosch
Reply With Quote
  #59  
Old 11-16-2008, 09:26 PM
Lord Doys Lord Doys is offline
 
Join Date: May 2003
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hollosch View Post
Hi,
i will test this. it means, that you don't use the patch ??? (i think the patch is only for vbwiki standard???)

thx
hollosch
indeed, i didnt use it (thought i did.. but had no effect, do removed it later)
Reply With Quote
  #60  
Old 11-16-2008, 09:34 PM
hollosch's Avatar
hollosch hollosch is offline
 
Join Date: Nov 2005
Location: Germany
Posts: 131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What about the cookie problem? It is still alive...
Did you solve the Go To Forum - problem? (Create thread in a forum instead of a discussion page in the wiki) - You use this in your wiki.
Reply With Quote
  #61  
Old 11-16-2008, 10:06 PM
Lord Doys Lord Doys is offline
 
Join Date: May 2003
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hollosch View Post
What about the cookie problem? It is still alive...
Did you solve the Go To Forum - problem? (Create thread in a forum instead of a discussion page in the wiki) - You use this in your wiki.

there are still some minor flaws.. but it as workable is it is now.. ill look into it later this week, off to bed now
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 04:42 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.04842 seconds
  • Memory Usage 2,344KB
  • 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
  • (6)bbcode_php
  • (4)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
  • (3)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