The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Deletion of Posts - triggers and hooks
This forum is really helpful! Now I got some more questions to post.
So now I've created a new plugin, I wanted to be able to detect a post being deleted by a Moderator or Admin. What hook should I use to detect this action so that I can update the database to reflect the changes right away? Of course there is a 'soft' delete and a 'physically remove', is there an array that contains either value? A sort of deletion array? Thanks as always! |
#2
|
|||
|
|||
Maybe the hooks postdata_delete, threaddata_delete, and threadfpdata_delete, and you could check to see if the user is an admin or mod (see includes/class_dm_threadpost.php, the three delete() functions). Although I suppose that would also run your code when a mod or admin deleted their own post, so maybe you could also check THIS_SCRIPT == 'inlinemod'. There are some situations where threads and posts might be deleted other than through moderation. I'm not sure if those would be important to you, but if they are you may have to do additional checks.
|
Благодарность от: | ||
ykkrox |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|