If you're talking about custom templates that you're creating and rendering in your custom page, then you should just call register() between the create() and render() calls, like:
Code:
$template = vB_Template::create('some_template_name');
$template->register('myvariable', $myvariable);
print_output($template->render());
If you want to register a variable to a vb template, then you need to use preRegister, and it's probably best to do it in a plugin (especially if it's one of those like header, headinclude, or footer). Use hook parse_templates and code like:
Code:
if (THIS_SCRIPT == 'myscript')
{
$myvariable1 = 'something';
$myvariable2 = 'something else';
vB_Template::preRegister('header', array('myvariable' => $myvariable, 'myvariable2' => $myvariable2));
}