2014-06-18, 03:09 AM
I'm trying to make a plugin that should provide a few extra variables for my theme. Therefore I need to know, how can I make, let's say, variable $custom_generated_html from my plugin available into the (existing) template [my template set] > Ungrouped Templates > codebuttons. So that when I do "<div>{$custom_generated_html}<div>" in that template. The content's of that variable should be inside the div element.
Basically I need to perform this every time the Editor is needed. So I tried with most of the hooks from ./newreply.php and ./newthread.php but the variable content is not outputted.
So I hook newreply_do_newreply_start, newreply_start, newthread_do_newthread_start, newthread_start to my function:
I've searched over the interned for the last few hours but I've found nothing helpful. Maybe I don't know what to search for
Basically I need to perform this every time the Editor is needed. So I tried with most of the hooks from ./newreply.php and ./newthread.php but the variable content is not outputted.
So I hook newreply_do_newreply_start, newreply_start, newthread_do_newthread_start, newthread_start to my function:
function mymod_editor_start()
{
global $mybb, $db, $lang;
// Grab stuff from the database then format it and then...
eval("\$custom_generated_html = \"THIS IS JUST SOME DUMB TEXT\";");
}
And then what? The variable isn't available in the template.I've searched over the interned for the last few hours but I've found nothing helpful. Maybe I don't know what to search for