As I was looking around in includes/class_core.php looking for the variable name for the 1st parameter I found this, which is in the methods for mysqli
Code:
/**
* Escapes a string to make it safe to be inserted into an SQL query
*
* @param string The string to be escaped
*
* @return string
*/
function escape_string($string)
{
return $this->functions['real_escape_string']($this->connection_master, $string);
}
so just use $vbulletin->db->escape_string(), it should work for mysqli