<style type="text/css"> <!-- @page { margin: 0.79in } P { margin-bottom: 0.08in } A:link { so-language: zxx } --> </style> Prior to vBulletin 4, you could reference your plugin variables within the templates without any extra necessary work. Say you wanted print out the words "This is my plugin" within the template header. The following code (with the correct plugin Hook Location) would allow you to do that.

$myplugin_output = "This is my plugin";

$myplugin_output
would then be referenced within the appropriate template.

With vBulletin 4, a little extra work is necessary to get your custom text to appear within your forum. You must now reference which templates you want to push these variables to or vBulletin will ignore them completely.

If you wanted to reference this variable within the template
header, you would need to include the following somewhere within my plugin code after the variable was set.

vB_Template:reRegister('header',array('myplugin_output' => $myplugin_output));

If you wanted to push this variable to multiple templates, you would need to include multiple versions of this line within your plugin. For example, if you wanted to push this variable to your FORUMHOME template in addition to header, you would need to add the following lines to your plugin code.

vB_Template:reRegister('header',array('myplugin_output' => $myplugin_output));
vB_Template:reRegister('FORUMHOME',array('myplugin_output' =>
$myplugin_output));

If you wanted to reference multiple variables within one template, you would just add to the existing array.

vB_Template:reRegister('header',array(
'myplugin_output' => $myplugin_output,
'myplugin_output' => $myplugin_output2,
'myplugin_output' => $myplugin_output3,
);

Back to Part One: http://www.vbulletin.com/forum/entry...etin-templates