2010-08-07, 11:17 PM
Hi,
I've created a plugin to insert a template, and eval/ it. Though, I'm having trouble trying to get it to display.
I'm using the following in my plugin:
I'm wanting it to be able to use {$bar} in my index template, but it's not displaying the "bar" template like it should.
Am I missing something?
Edit: Maybe I'm not using a correct plugin hook?
Thanks.
I've created a plugin to insert a template, and eval/ it. Though, I'm having trouble trying to get it to display.
I'm using the following in my plugin:
function bar_functions()
{
global $mybb, $templates;
$templatelist = "bar";
eval("\$bar = \"".$templates->get("bar")."\";");
}
I'm wanting it to be able to use {$bar} in my index template, but it's not displaying the "bar" template like it should.
Am I missing something?
Edit: Maybe I'm not using a correct plugin hook?
$plugins->add_hook("pre_output_page", "bar_functions");
Thanks.