MyStudio Free demo
Writing your first plugin: hooks explained — follow-up - Printable Version

+- MyStudio Free demo (https://demo.mystudio.forumeze.com)
+-- Forum: Products & Services (https://demo.mystudio.forumeze.com/forum-8.html)
+--- Forum: MyBB (https://demo.mystudio.forumeze.com/forum-9.html)
+---- Forum: Plugins (https://demo.mystudio.forumeze.com/forum-11.html)
+---- Thread: Writing your first plugin: hooks explained — follow-up (/thread-128.html)



Writing your first plugin: hooks explained — follow-up - RetroRex - 07-31-2026

Remember: _activate() should be reversible, _install() owns permanent structures.

Hooks are the heart of MyBB plugins — [code=php]$plugins->add_hook('pre_output_page', 'my_func');[/code] is where everything starts.

I keep a list of essential plugins and thought I would share it here.

xmlhttp.php is the cleanest way to add AJAX endpoints to MyBB.

Maybe this has been discussed before, but I could not find anything recent.

Curious what everyone else here thinks about it.


- TechTress - 07-31-2026

Always call rebuild_settings() after changing settings programmatically.

That hooks explanation finally made it click for me.


- CraftyCathy - 08-01-2026

That hooks explanation finally made it click for me.

Whitelist-based hooks debugging in class_plugins.php helped me a lot.

Thanks for sharing, saved me a lot of time.


- CraftyCathy - 08-02-2026

Always call rebuild_settings() after changing settings programmatically.

Could not agree more.