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