MyBB Community Forums

Full Version: What hook to use
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What hook can I use to run something right above the first catagory (or right below the header), ya know right in that area?

Thanks in advance Smile
Hook the 'index_start', and declare a global $header. From there you can use $header .= "etc.."; to add code after the header (right before the first category).


$plugins->add_hook('index_start', 'myfunction');

function myfunction()
     global $header;
     $header .= "Text on top of categories! Whoa!";

Hope that helps :)
Awesome I will use that now Big Grin I was using index_start but never thought about using $header.

EDIT: Works Big Grin