It's just this:
Code:
global $vbulletin;
vB_Template::preRegister('postbit_legacy', array('testvar' => $forum['forumid']));
and I inserted "Test var: {vb:raw testvar}" in my postbit_legacy. That's the latest code - I was changing it to test different things, so I previously had it displaying some $vbulletin options values just to make sure they were set as expected (I had been thinking maybe if it was an ajax call that not everything was being loaded like on normal request).