2013-07-22, 10:48 AM
Im trying to determine if the "delete post" button has been clicked, but I'm having issues as the quick delete button seems to trigger an external file (edit.php).
I'll explain a little on what I'm doing. First of all I am checking if the "new reply" button is clicked, if it is I am then incrementing a newly created database field (the same way that a post number would be incremented):
The above code is working as I expected, so thats all good. My problem is, I need to decrement the database field if the post is deleted. What "post action" do I need to use to check if the delete button has been clicked ?
I know the delete action is:
But accessing it via the postbit seems to be a problem ? Do I need to hook into edit.php ?
I'll explain a little on what I'm doing. First of all I am checking if the "new reply" button is clicked, if it is I am then incrementing a newly created database field (the same way that a post number would be incremented):
if ($mybb->input['action'] == "do_newreply")
{
// increment database field here
}
The above code is working as I expected, so thats all good. My problem is, I need to decrement the database field if the post is deleted. What "post action" do I need to use to check if the delete button has been clicked ?
I know the delete action is:
if($mybb->input['action'] == "deletepost")
{
}
But accessing it via the postbit seems to be a problem ? Do I need to hook into edit.php ?