I wonder how you ported anything without knowing the basics ...
$vboptions = $vbulletin->options
$DB_site = $db (Or $vbulletin->db, it's the same anyway)
$bbuserinfo = $vbulletin->userinfo
$session = $vbulletin->session->vars
addslashes() = $db->escape_string()
globalize = $vbulletin->input->clean_array_gpc, the Types have also changed
print_standard_error() = standard_error(fetch_error())
Change all that, check if there are errors - and then ask again