FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Import msgs from vBulletin 3.5.x
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Import msgs from vBulletin 3.5.x [message #35104 is a reply to message #35098] Fri, 08 December 2006 00:30 Go to previous messageGo to previous message
Rolfla is currently offline  Rolfla   Sweden
Messages: 3
Registered: December 2006
Location: Sweden
Karma:
Junior Member
Ilia:

... with little tweaking it can be made to work with version 3.5 as well.

It seems like the script is abit confused as to which database it operates on. If I understood the idea this code (line 128 in vb2.php) is supposed to delete any avatar's in the FUD forum:
/* Import Avatar Gallery */
  q("DELETE FROM ".$GLOBALS['DBHOST_TBL_PREFIX']."avatar");

But the code fails. It seems to me that the script is trying to access the vb-databse instead (error message):

E:\xampplite\htdocs\forum_fud\VB2.php:161
) 1146: Table 'forum_bulletin.fud26_users' doesn't exist
Query: DELETE FROM fud26_users


(Surprise... I would have expected 'forum_fud.fud26_users'... unless this is only due to a bug in the error msg).

I noticed that $GLOBALS is not set correctly. I had set the following config path to vBulletin on line 23 (which is a valid windows path):
// $VB2_CONFIG_PATH = "/home/forum/F/vb/admin/config.php";
   $VB2_CONFIG_PATH = "e:/xampplite/htdocs/forum_bulletin/includes/config.php4";

...but on line 72 I still had to "enforce" the value since it was missing:
   $GLOBALS['dbname'] = 'forum_bulletin'; // <-- fix /RIL:
   $r= mysql_db_query($GLOBALS['dbname'], $str, $GLOBALS['vb2db']);


A check if I got anything right; in the following code (~125) I understood q() to access the fud db, and Q2() to access the vB-db, right?:
/* Import Avatar Gallery */
   q("DELETE FROM ".$GLOBALS['DBHOST_TBL_PREFIX']."avatar");
   $r = Q2("SELECT * FROM avatar");

Could this info altogether give any ideas about why the config-variables for vB gets messed up? (or not set correctly).

Although I'm a newbie on PHP I use PhpED with debugger and I was pretty sure of that I would figure this out but, well.

Regards,

// Rolf Lampa

XAMPP,
PHP Version 5.1.4
Windows NT M70 5.1 build 2600
Apache 2.0 Handler
MySQL 5.0.21
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Need help with debugging
Next Topic: paths and stuff me thinks
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 01:35:15 GMT 2024

Total time taken to generate the page: 0.04151 seconds