This hack can be done in several different ways, but I think this is a long winded way of doing it, the way I'd do it is in your non-vb dir, create a config.php, and just simply connect to your forum's DB. Then in your file you want to include the data, require config.php, and then run the 3 queries.
Nice hack nonetheless, as it gets the job done

, everyone has their own way of doing this.