MyBB Community Forums

Full Version: How to: Run a hook?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
any info or a link, on doing this?
Make Your Own:
Add this in the file where you want to hook ...
$plugins->run_hooks("HOOK_NAME");

To Call The Hook:
Add this into the PluginFile
$plugins->add_hook("HOOK_NAME", "FUNCTION_NAME");

function FUNCTION_NAME()
{
...
}
you may intersting read this thread
http://community.mybboard.net/showthread.php?tid=16697
Thanks guys, i want to add sideboxes to to my thread show page(s), & is what i have in mind?
I appreciate the , help! and steps in doing this.
would i type in the show_ thread_ page
where hook goes?
And under function the Tag {$side_boxes}
???
http://wiki.mybboard.net/index.php/MyBB_Plugin_Hooks

I would just add a new hook and use the original function
$plugins->add_hook("showthread_start", "sideboxes_start");

Then modify the showthread template; where you add the vars ( $sb_latestthreads, $sb_search ... )
Thanks again Lex,
I will read up on this first and then , attempt this plan into action!