The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
What hook to use?
Im trying to create a mod that searches through every post thats being posted and then, if it finds a certain character string, updates a table with the id of that post.
Im using the newpost_complete hook and it works quite fine. But Id also like it to look through edited posts and then, if the user has removed the string, remove the post id from my table, and if the user has added the string, add the post id. This works some of the time, but not always. If I try to edit the post a couple of times it usually work though. I believe this might be because Im using the wrong hook. Ive tried both editpost_update_complete and editpost_edit_complete, but Im not getting 100% success rate on any of them. Is it my code thats not working or am I injecting it in the wrong place? Ive tried to cut down my code to simply Code:
die(); --------------- Added [DATE]1192922939[/DATE] at [TIME]1192922939[/TIME] --------------- Edit: It seems like i found the answer to my own question. The right hook to use is editpost_update_complete and the problem was with my code. I thought you could find the edited post in $postinfo['pagetext'], but in reality that var contained the post as it looked _before_ the edit and not after. The right var is $edit['message']. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|