PDA

View Full Version : 3.8 to version 4 conversion check


ZERO <ibis>
10-15-2010, 05:41 PM
I just want to check if any of my program coded for vb3.8 is going to break if I switch to vb4. I really want to get vb4 up and running but want to ensure that this code does not break in the process:

$sbname = $userdata->fetch_field('username');
$sbemail = $userdata->fetch_field('email');
$sbpassword = sha1(sha1('SourceBans' . $vbulletin->GPC['password']));
$sbsteam = $userdata->userfield[$steamfield];

$db->query_write("
INSERT INTO sb_admins (user, authid, password, email)
VALUES ('$sbname', '$sbsteam', '$sbpassword', '$sbemail')
");

$sbquery = $db->query_read("
SELECT aid
FROM `sb_admins`
WHERE `user` = '$sbname'
AND `authid` = '$sbsteam'
AND `password` = '$sbpassword'
AND `email` = '$sbemail'
");

$sbrow = $db->fetch_array($sbquery);
$sbaid = $sbrow['aid'];

$db->query_write("UPDATE " . TABLE_PREFIX . "userfield SET $sbaidfield = $sbaid WHERE " . TABLE_PREFIX . "userfield.userid = ". $userdata->fetch_field('userid'));

This is hooked to register_addmember_complete am I safe to assume that vb4 uses the game hook locations and variables as stated in the above code. If not what sorts of things to I need to change?

Lynne
10-15-2010, 06:15 PM
The best thing to do is to set up a test site - Creating A Test Site (http://www.vbulletin.com/forum/content.php?225-Creating-A-Test-Site) - and then try it and see.