View Full Version : 3.8 to version 4 conversion check

ZERO <ibis>
15 Oct 2010, 18:41
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];

INSERT INTO sb_admins (user, authid, password, email)
VALUES ('$sbname', '$sbsteam', '$sbpassword', '$sbemail')

$sbquery = $db->query_read("
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?

15 Oct 2010, 19:15
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.