MyBB Community Forums

Full Version: event hooks?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i'm making a mod for mybb, can i use

$plugins->run_hooks("whatever");

within the mod to allow being able to make plugins for it? or do i have to do some extra steps?
I think that's all you need to do. I'm not 100% sure though since I haven't tried Wink
A list of all hooks can be found here: http://community.mybboard.net/showthread.php?tid=3553
I don't quite get what you are doing.

You can add your own plugin hooks with
$plugins->run_hooks("my_hook");

and you can make your plugin run a function with
$plugins->add_hook("my_hook", "my_function");

You can also add a priority to the add_hook function. This will make it run before other hooks.
decswxaqz Wrote:I don't quite get what you are doing.

You can add your own plugin hooks with
$plugins->run_hooks("my_hook");

and you can make your plugin run a function with
$plugins->add_hook("my_hook", "my_function");

You can also add a priority to the add_hook function. This will make it run before other hooks.

yup, that's what i was asking.