I always use $db in frontend files, but of course use the correct object when using classes. I do it for readability, and because it is faster to type.
$bbuserinfo and $vboptions are different because they aren't available (as said) in the PHP files, though running legacy_enable() will allow you to use them. Templates automatically convert them to their $vbulletin->X counterparts ($GLOBALS['vbulletin']->X I think).
They say not to use $db in functions, because you will either have to global it as well ($vbulletin and $db) or create a reference to it.
Anyway, not a big deal either way... personal preference by the looks of it.
Edit: By the way, you don't need to exit; after using print_output(), because it will do it for you.
|