MyBB Community Forums

Full Version: Deactivating the plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi,
i am creating a plugin, which when its activated, it adds a global template.
how do i get mybb to delete this template once the plugin is deactivated?
You put the code you need in your plugin function YourPluginName_deactivate()

function PLUGIN NAME_deactivate() {

	global $db;

	// Remove the custom template
	$db->delete_query("templates", "title = 'TEMPLATE NAME'");

}


Try this Smile
thanks Andrew!
that worked!