Quote:
Originally Posted by Omegatron
well your plugin would hook where ever you wish and to access the variable in the header template it would be something like this
{vb:raw random_number}
|
Well, I understand that much of it, but I'm not sure about how to go about formatting the plugin and registering the variable in the way that I need to. Any way that I've tried to register the variable in the provided examples I've seen anywhere have proved to be ineffective. I understand how to use the variable in the templates, but I'm unsure of how to correctly register the variable in the plugin while effectively being able to use {vb:raw random_number} in a specific and already available template.
Furthermore, while providing more information, in the following example:
PHP Code:
$templater = vB_Template::create('my_custom_template');
$templater->register('a_variable ', $a_variable);
$somevariable .= $templater->render();
I only understand the $templater->register('a_variable ', $a_variable); there. Being that I'm not creating a template, the first line of code makes no sense to me. I also do not understand the render code or what I should use there either.