MyBB Community Forums

Full Version: Change load order of Plugins
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, i made a couple of plugins that add/use info from the database. The problem is that i have 1 plugin to set the database info and other one to use  the database. If the second one dont find info, just create the info by default. If i use the 2 plugins at the same time, the first one to execute its the one which use the info, so the other one have nothing to do. 

Im using the hook for message, and it changes a code [plugin1] for html code like a bbcode but with database info. So, how can i change the load order of the plugins? where its the file that changes wich pluging executes first and this kind of things? I need that if a user puts [plugin1] [plugin2], the plugin1 executs before plugin2, but now use first plugin2

Ty for help
Plugins are loaded as they appear in the plugins cache's active array (which can be inspected in ACP's Tools & Maintenance → Cache Manager) - new values are simply appended to it upon activation, so re-activating the plugin that should be loaded last might help.

This is not the recommended solution, though - usually it's possible to resolve such problems by using different hooks or hook priorities: https://docs.mybb.com/1.8/development/pl...ok-options
Ty for help, the hook priority fix it. Have a nice day