What template was it? and make sure you checked that the variables actually had some data in them. Also make sure you eval()'d the template like this (if you are using a custom one)
PHP Code:
eval('$somevar = "'. fetch_template('your_template') .'";');
Then you would place $somevar in a normal vBulletin template and it would display your code there.
I doesn't make much difference if you place your code in Plugins or PHP files, but the plugin system is there so you don't have to mess with Files.