jaslon
12-21-2015, 07:44 AM
I am running vBulletin 3.8.9 with the following spam keyword filter:
https://vborg.vbsupport.ru/showthread.php?t=184757
The filter works okay and auto-moderates / unapproves messages that contain spam keywords. The filter works both on new posts and edits of old posts. However, it has one annoying bug when the following happens:
1. A spammer first posts a message without any spam keywords so that a new thread and a new post is created
2. The spammer then returns and edits his message and adds spam keywords to the post
3. The filter then auto-moderates the post using the following code linked to the "editpost_update_process" hook:
$dataman->set('visible', 0);
$edit['visible'] = 0;
4. If the edit has been done within the time-limit when no "Edited by..." is displayed and the old version of the post is not saved then this will result in a visible thread that contains no posts visible for normal users. There is a post there, but the spam keyword filter has unapproved it.
I would like to extend the mod so that it also unapproves the thread when this happen. I'm quite new at mod development and would appreciate if anyone has any advice on how to also unapprove the thread that the post is located in. How would the php code look to unapprove a thread under the "editpost_update_process" hook?
https://vborg.vbsupport.ru/showthread.php?t=184757
The filter works okay and auto-moderates / unapproves messages that contain spam keywords. The filter works both on new posts and edits of old posts. However, it has one annoying bug when the following happens:
1. A spammer first posts a message without any spam keywords so that a new thread and a new post is created
2. The spammer then returns and edits his message and adds spam keywords to the post
3. The filter then auto-moderates the post using the following code linked to the "editpost_update_process" hook:
$dataman->set('visible', 0);
$edit['visible'] = 0;
4. If the edit has been done within the time-limit when no "Edited by..." is displayed and the old version of the post is not saved then this will result in a visible thread that contains no posts visible for normal users. There is a post there, but the spam keyword filter has unapproved it.
I would like to extend the mod so that it also unapproves the thread when this happen. I'm quite new at mod development and would appreciate if anyone has any advice on how to also unapprove the thread that the post is located in. How would the php code look to unapprove a thread under the "editpost_update_process" hook?