$plugins->add_hook("postbit", "reklamlar_runn");
function reklamlar_runn($post)
{
global $db, $mybb, $templates, $reklamlarkod2, $reklamlarkod3;
eval("\$reklamlarkod2 = \"".$templates->get("reklamlarkod2")."\";");
eval("\$reklamlarkod3 = \"".$templates->get("reklamlarkod3")."\";");
}
not working my plugin in postbit
where error ?
not public in now. for this (not working postbit) error.
Well we don't know what it does so how can anyone help you??
my english bad. sorry.
my plugin all code public? or you pm send?
Right, is what you posted above all the code of your plugin??
Ok there are two things which I see which raises some questions:
1) Are your templates reklamlarkod2 and reklamlarkod3 added to the template manager?
2) You need to change your variables to the following:
eval("\$post['reklamlarkod2'] = \"".$templates->get("reklamlarkod2")."\";");
eval("\$post['reklamlarkod3'] = \"".$templates->get("reklamlarkod3")."\";");
And I suppose in the postbit template you have to change these variables too
The reason for this is that the build_postbit function does not have these variables globalized.