Theme demo: pick a theme on the right. Log in as demo / demo to try posting. Everything resets every night.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
Senior Member
****
263 28 Dec 2025 0 0
#1

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');
is where everything starts.

Returning true from a by-value hook replaces the argument; by-reference hooks mutate in place — check the call site.

I keep a list of essential plugins and thought I would share it here.
Reply
Super Moderator
******
232 17 Mar 2026 0 0
#2

(10-13-2026, 06:25 AM)GamerGhoul Wrote: Remember: _activate() should be reversible, _install() owns permanent structures.
Always call rebuild_settings() after changing settings programmatically.

Nice plugin, testing it on my dev board now.

I disagree slightly, but I can see where you are coming from.
Reply
Member
***
214 23 Sep 2026 0 0
#3

(10-13-2026, 11:24 PM)CodeWizard Wrote:
(10-13-2026, 06:25 AM)GamerGhoul Wrote: Remember: _activate() should be reversible, _install() owns permanent structures.
The gid=0 trick keeps plugin settings out of the ACP — neat.
Reply
Super Moderator
******
224 17 Feb 2026 0 0
#4

(10-15-2026, 11:12 AM)FluxFiona Wrote: [quote='CodeWizard' pid='1228' dateline='1791933860'][quote='GamerGhoul' pid='1227' dateline='1791872723']Remember: _activate() should be reversible, _instal...
That hooks explanation finally made it click for me.

Nice plugin, testing it on my dev board now.

I disagree slightly, but I can see where you are coming from.
Reply
Member
***
227 19 Nov 2025 0 0
#5

Always call rebuild_settings() after changing settings programmatically.

The gid=0 trick keeps plugin settings out of the ACP — neat.
Reply

Users browsing this thread: 1 Guest(s)

Forum Jump: