MyBB Community Forums

Full Version: Settings button to reset database
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How can I add a button to my plug-in settings that runs a code to reset a part of the database once clicked?
Why would you reset a DB part after pressing a button in settings? That defeats the purpose of a setting, because you don't set any value, you just do an action immediately. Instead you should rather add that either to the plugin's description or on a separate subpage. Example in one of my plugins:
https://github.com/Destroy666x/MyBB-Stor...hp#L38-L45
https://github.com/Destroy666x/MyBB-Stor...#L117-L159