vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Integrate or bridge with MediaWiki (https://vborg.vbsupport.ru/showthread.php?t=112973)

HolisticEarth 04-18-2006 11:36 AM

Quote:

Originally Posted by Zachery
Intresting, say I already have a wiki setup and working, how will this work then?

It wont erase anything from the database. It is like other plugins - you just install it and it starts using the vb database for login info. There might be conflicts if users have the same info but different passwords, or if another user has a different username that exists for someone else, but I dont know ... i started this from a fresh wiki. A sure way to fix it would be to erase all the users but wikisysop and start with a fresh users db.

Brent H 04-19-2006 11:26 PM

Thanks for this, installed and working.

TheFinney 04-24-2006 09:42 PM

Hi, I'm not that great at PHP. For the changing of the values, do I replace everything after the $, or after the $wgDBserver, or something else?

Thanks!

Cyburbia 04-26-2006 09:23 PM

Thanks for making this!

I'd use it if it weren't for the "no alphanumeric characters" restriction. It would be terrific id there was a way around it.

HolisticEarth 04-27-2006 11:45 AM

Quote:

Originally Posted by Cyburbia
Thanks for making this!

I'd use it if it weren't for the "no alphanumeric characters" restriction. It would be terrific id there was a way around it.

Yeah, I have a forum with a moderate amount of people (~3000), and there are many non-alphanumeric characters as well.

I like your website btw, I found a bit of information on it for a paper or two I have done at University.

Quote:

Originally Posted by TheFinney
Hi, I'm not that great at PHP. For the changing of the values, do I replace everything after the $, or after the $wgDBserver, or something else?

Thanks!

For the values, and php in general, $something is a variable, and if it is a string, you can thing of it as "somevalue". So if you were to hard-code something like the server name, you would replace $servername with "servername".

ndahiya 05-06-2006 01:25 PM

# Rehash of sammyman's and my posts in the old thread::


You might get the following error (looks like only with PHP 4.3.11):
Quote:

Fatal error: Call to a member function on a non-object in /home/user/public_html/manuals/includes/SpecialUserlogin.php on line 314
Workaround: In includes/SpecialUserlogin.php, find:
$u =& $this->initUser( $u );
Replace this to this:
$u = $this->initUser( $u );



Excessive Database Pings

Quote:

Originally Posted by HolisticEarth
[*]Open your wiki/LocalSettings.php file[*]Insert the following code at the end of the file, before the ?>:
PHP Code:

# vBulletin integration script
require_once("AuthPlugin_vBulletin.php");
// if vBulletin and MediaWiki are not installed on the same database
// change these values to reflect your vBulletin database information
$wgAuth = new AuthPlugin_vBulletin($wgDBserver$wgDBuser$wgDBpassword$wgDBname"vb_"); 

If you are running vBulletin and MediaWiki in the same database, then it already uses the connection information.
If you are not running vBulletin and MediaWiki in the same database, please change the strings to reflect your vBulletin database information.
In either case, the last value is whatever your vBulletin table prefix is.

This works perfectly fine, but for one problem.... Inserting the code in LocalSettings.php creates a "session" to mysql every time someone accesses *any* page in the wiki... (you can see this by putting in the wrong password). On my server, this caused too many sessions being created in mysql, and resulted in the intermittent access problems (as the db was unavailable)!!


The way around this is (Thogh a less elegant solution, and one you have to reapply every time your upgrade mediawiki) to insert the same code near the begining of "includes/User.php"

This takes care of the excess pinging problem, as the vb database is accessed only when a user tries to login.

BizzehDee 05-21-2006 10:33 PM

hey,
i used this to try to integrate my mediawiki 1.6.x install with my vb3.5.x install. i did exactly, and only, what the tutorial said... none of the users on the board are able to use their login that they registered with vbulletin, on mediawiki.. is there something im missing?

Da Drgon 05-23-2006 02:29 AM

I'm getting the same problem... running MW 1.6.5 and vb 3.5.4 here.... I followed the instructions but instead of denying anonymous read access, I left it enabled... I also inserted the $wgAuth code in includes/user.php instead of localsettings.php after reading ndahiya's post

I'm getting this error:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/xxxxxx/public_html/wiki/AuthPlugin_vBulletin.php on line 90

FYI, my site is run off a shared host, so all my database name starts with my host login name then an underscore then the actual database name (ie: joeuser_wiki)

does this have something to do with MW not being able to access the vb_ tables? if so how do I specify directly where to find the tables in the code snippet? or is it just more coding errors?

thisgeek 05-30-2006 05:40 PM

Quote:

Originally Posted by Da Drgon
I'm getting the same problem... running MW 1.6.5 and vb 3.5.4 here.... I followed the instructions but instead of denying anonymous read access, I left it enabled... I also inserted the $wgAuth code in includes/user.php instead of localsettings.php after reading ndahiya's post

I'm getting this error:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/xxxxxx/public_html/wiki/AuthPlugin_vBulletin.php on line 90

I'm getting the same issue with MW 1.6.6 and vb 3.5.4. I also inserted the code in includes/User.php. It doesn't work even if I do it as originally directed.

I'm running PHP 5 and MySQL 5.


EDIT: I'm a complete tosser. I just realised I had the database connection info completely wrong. *sigh* That's what you get for trying to do stuff like this when you're tired.

So..... It's working :)

Da Drgon 06-05-2006 08:16 AM

thanks for replying and getting me to rethink of what I've exactly done.... so I'm an idiot and I also had the connection info wrong.... it's working now on MW 1.6.6!


All times are GMT. The time now is 10:08 PM.

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.01294 seconds
  • Memory Usage 1,749KB
  • 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_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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