Deactivating the plugin
#1
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?
Reply
#2
You put the code you need in your plugin function YourPluginName_deactivate()
MyBBCodes.com owner/administrator
Cool " It is not what you know that matters, it is what you do or do not do!"
We have currently 175+ MyBB Exclusive Plugins, 80+ MyBB Compatible MyCodes
Reply
#3

function PLUGIN NAME_deactivate() {

	global $db;

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

}


Try this Smile
<signature too big>
Reply
#4
thanks Andrew!
that worked!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)