MyBB Community Forums

Full Version: Hook to render tag inside Header template
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm modding with a plugin and I'm having a problem: my plugin-call ( {myplugin} ) works just fine when it is placed in the Index template, but if the plugin is placed inside the Header template, it won't render.

I believe that is because of this line:

//problematic line?
$plugins->add_hook("index_start","myplugin");

function myplugin(){
     global $myplugin, $mybb;
     $myplugin=' ... html ... ';
}

And I think what I need to do is to change the "index_start" hook to something else. I took a look at all the hooks, but I'm not sure which one to use.

Question
Which hook should I be using instead of 'index_start'


Oh!

Nevermind


Found it, global_start