MyBB Community Forums

Full Version: my eval won't work??
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have 3 add hook
$plugins->add_hook("editpost_start", "hbb_do");
$plugins->add_hook("newthread_start", "hbb_do");
$plugins->add_hook("newreplay_start", "hbb_do");
and one function by the name hbb_do()
but evals don't give me templates
function hbb_do()
{
    global $db, $templates;
    eval("\$hbb_up = \"".$templates->get("hbb_up")."\";");
    eval("\$hbb_h = \"".$templates->get("hbb_h")."\";");
    eval("\$hbb_d = \"".$templates->get("hbb_d")."\";");
}

when I echo $hbb_d or ... I get them!!Sad
Well eval itself won't do magic.

Add:
global $hbb_up, $hbb_h, $hbb_d;

Before eval'ing