vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Administrative and Maintenance Tools - MonkeyStop - Auto-Moderation of Spammer Keywords and URLs by postcount (https://vborg.vbsupport.ru/showthread.php?t=129390)

tweakmonkey 10-17-2006 10:00 PM

MonkeyStop - Auto-Moderation of Spammer Keywords and URLs by postcount
 
Description
-----------
A quick but effective hack that lets you set keywords that will flag posts and set as Moderated, requiring approval from a mod/supermod/admin before they're visible to users. You can also set the number of URLs to be allowed per post to stop flooding from spammers. Additionally, you can configure
the number of posts required to avoid the moderation, so the filter only effects new users to your forum.

Installation
------------
Import product-monkeystop.xml (ACP / vBulletin Options / Manage Products / [Add/Import Product])

Usage
------------
Configure the product in ACP / vBulletin Options / vBulletin Options / General Settings. (scroll to the bottom)
New threads and posts containing the offenses will automatically be moderated.
You can view moderated threads in ACP / Moderation / Moderate Threads. You should also see an icon in the thread postbit and forum display if the post is moderated (see screenshot).

Since most spammers register then spam your board while their post count is low, it may be effective to leave the default values (0 URLs allowed until post count is 3) or even up the post count requirement. If you wish to allow some links, change URLs to 1 or 2 for example.

!!! Warning !!!
------------
If you allow keyword auto-moderation, your users will receive an "Invalid Thread" message when they use a flagged word on new threads because it's a moderated thread. However this error can be customized here:
Admin Panel / Phrase Manager / phrase type: Error Messages / invalidid (page 15 or so of the errors)
I added:
Code:

<br/><br/>If you received this message immediately after posting a new thread, there's a good chance your message was flagged as spam. Please read this thread for more info.
... and supplied a link for my users explaining why their post was moderated.

Credits
-----------
This is a hack of the "Auto Moderation by Keywords" mod by Andreas (https://vborg.vbsupport.ru/member.php?u=47102)
Thanks go out for his great mod -- if only I could PM or e-mail him to thank him directly! I only made minor changes to the mod to allow it to work with vBulletin 3.6.0 (by default it wouldn't work on new threads) and to auto-moderate posts URLs.
So give him credit if you think it's cool, but his PM box is full. ;)
Dan "Tweak Monkey" Kennedy

History
-----------
v1.0.1: Added minimum post count option
v1.0.0: Initial release

Lionel 10-18-2006 12:32 PM

Based on the assumption that spammers always use a URL, can I just set http:// as a keyword?

Can it be made so only members posting the first time is subjected to that?

Protoman 10-18-2006 02:54 PM

this is almost identical to andreas code.

tweakmonkey 10-18-2006 04:11 PM

Quote:

Originally Posted by Lionel
Based on the assumption that spammers always use a URL, can I just set http:// as a keyword?

This would make any post containing a URL be moderated. If that's your goal, yes you can do that.


Quote:

Can it be made so only members posting the first time is subjected to that?
Edit - just added this feature.

tweakmonkey 10-18-2006 04:28 PM

Quote:

Originally Posted by Protoman
this is almost identical to andreas code.

It's based on his code and that's why I gave him so much credit and mention that several times throughout the post and documentation. ;) His version did not work for me, so I fixed it for everyone else.

I tried PMing Andreas to request an update but his PM box is full. I also tried e-mailing him but his address is not listed. His web site was too confusing for me (as it's not English and some pop-ups that got in the way) so I couldn't find a way to contact him about this mod.

He hadn't updated his mod in over a year and doesn't list that he supports it -- meaning that anyone using VB 3.6+ doesn't have the option to use it (and it's a great concept for sure). I figured this could help some people and I give him all the credit for the original mod in both my post and the readme.txt. I just gave it a slightly different name so I can keep developing it without conflicting with his version -- if I make more changes I'll post them up and anyone can use them / modify them as well to continue developing this concept.

I hope this is acceptable, I really just wanted to help the community.

Here are the changes I made in case you were curious:
---
1) Andreas' code did not work with VB 3.6.0 (at least for me) because the $this->fetch_field('pagetext') field seemed invalid when posting new threads, so his mod did not stop new threads from being posted (the biggest problem with spammers). I changed this to $this->fetch_field('pagetext', 'post') which fixed this.

2) I added two alternate conditional statements that check how many times the string "http:" is contained in the post:
Code:

if (substr_count($this->fetch_field('pagetext', 'post'), 'http:') > $this->registry->options['automodurls'])
If there's a more effective method to prevent a user from posting links I can modify it -- it was really just a last minute idea but it works well (see screenshot).

3) I added the # of URLs to the plugin as a new setting so it can be defined in the admin panel.

4) Andreas code said to use "colon" to separate the keywords, but it requires commas.

5) There was at least one typo and some hard to digest instructions that I cleaned up. I also re-wrote the readme with info on how to warn users their thread was blocked, since that wasn't addressed in the original.

6) It now also checks the post count of the user and only filters posts if they are below the threshold.

ZacUSNYR 10-18-2006 07:07 PM

Great idea! I don't have any spam problems on my site but if it comes up i'll remember this :)

tweakmonkey 10-18-2006 07:14 PM

Quote:

Originally Posted by Lionel
Can it be made so only members posting the first time is subjected to that?

Just an update, I added this feature. Please let me know how it works for you. There is now an additional option to set the number of posts a user must have to avoid being moderated (so you could set it to 3 for example and the users must have 3 posts before the keywords/URLs are flagged).

Bad Bunny 10-19-2006 12:27 PM

This sounds really useful. I hope there is no issue with you developing this. It's a very nice thing to share it. May use this in the near future.

furst 10-19-2006 03:57 PM

Is there any chance of adding a feature to this that would automatically move posts containing predefined words to an assigned forum? It would save me a whole lot of time :P

zooki 10-19-2006 10:06 PM

this sounds promising, i have occassional spammers, mostly trying to sell drugs

tweakmonkey 10-20-2006 05:48 AM

Quote:

Originally Posted by furst
Is there any chance of adding a feature to this that would automatically move posts containing predefined words to an assigned forum? It would save me a whole lot of time :P

Ah, so instead of moderating it, it would move it to say, a dump forum? I can probably implement that when I have time.

tweakmonkey 10-21-2006 07:10 PM

I've found it's also effective to add the keyword "www" to the filter, so if low-postcount spammers don't post the full URL it will still block their posts.

IrPr 10-26-2006 01:02 PM

Finally Done!

Thanks Dan, i was waiting for this

Smoothie 10-27-2006 01:44 AM

Can someone post a screenshot of "Configure the product" settings?

tweakmonkey 10-27-2006 03:14 AM

Quote:

Originally Posted by Smoothie
Can someone post a screenshot of "Configure the product" settings?

Check the first post now, I've added it as an attachment.

adwade 10-27-2006 05:59 AM

This is a very nifty, but powerful modification. Many Thanxx for creating and sharing it with all of us!

adwade 10-27-2006 07:41 AM

Well I broke it somehow.:confused:

I imported the .xml file, set the critera in the AdminCP, and then edited the invalidid phrase and it worked fine at first.

Then I went and created a new discussion thread (similar to yours) that the invalidid phrase error could point them towards. Lastly, I went back and re-edited the invalidid phrase with the address of that newly created thread.

Once I did that, I no longer get an error notice anymore when I post spam now.:disappointed: The MOD still works, in that it seems to perfectly catch what needs to be held for moderation...it's just it doesn't tell the author anything about what's being done.(i.e. Doesn't seem like the invalidid error msg is being called upon any longer)

After posting, the screen refreshes and you're brought back to the thread, but w/o the spam message showing up you just posted.(as it's being held for moderation now)

I went back and reset the invalidid phrase to original and it didn't help any. I went back and re-imported the .xml file and it didn't help. Any ideas as to what else could be wrong??

EDIT: Nothing is broke, I just didn't understand how the MOD works. Turns out it still works perfectly for NEW THREADS. It just doesn't show the person posting a REPLY or QUICK REPLY the error message as I thought it would. In either case, it still marks the message awaiting moderation as it should though. :up:

Smoothie 10-28-2006 02:06 AM

Quote:

Originally Posted by tweakmonkey
Check the first post now, I've added it as an attachment.

Is is all or none for the settings? In other words can you set just one setting and leave the rest blank?

tweakmonkey 10-28-2006 03:08 AM

They are individually checked except postcount.

If you set the keywords to blank, it will only use the number of URLs and post count.
If you don't want to use the URL option set it very high, like 50 per post.
If you don't want to use the postcount option, set it to 0.

tweakmonkey 10-28-2006 03:13 AM

Quote:

Originally Posted by adwade
Well I broke it somehow.:confused:

After posting, the screen refreshes and you're brought back to the thread, but w/o the spam message showing up you just posted.(as it's being held for moderation now)

Are you using the Phrase Manager or the Language Manager?

I changed the message here: Languages & Phrases -> Phrase Manager -> Phrase Type: Error Messages -> invalidid

I noticed the option exists in the Language Manager as well but it does not seem to make the error message change. This error message should be independent of the mod -- meaning if you uninstalled the mod you should be able to change this error to "I eat sandwiches" or something and see it whenever a thread is not found or is moderated.

Ideally I'll mod it to give the same message given when a user posts a message that is flagged as moderated, but I don't know where to do this yet...

Lionel 10-28-2006 07:48 AM

I am very happy with this hack. I think it's the best spam stopper I've seen so far. Based on the principle that those spammers will register for the sole purpose to post a URL, I have been able to stop all of them.

Anyway I came here to thank you again, but I saw it was updated yesterday. I am curious to know what was changed, because it works for me.

tweakmonkey 10-28-2006 11:14 AM

I believe it says I updated it because I added a screenshot. Sorry for the confusion. I will do a mass-message if there are major updates. If you have any suggestions or run into problems please PM or reply here. Thanks and I'm glad you like it! :)

kether1 10-28-2006 04:48 PM

Hi Tweakmonkey!

I installed this mod (3.6.0) and am having a different problem and a similar problem as the one that adwade was/is having.

1st. the mod worked just like you said it would. So I too adjusted the error message. The only problem in my Admincp >Language & Phrases > Phrase Manager > Phrase Type: (I did not have the "phrase type: Error Messages / invalidid" as a choice) SO, to find the actual phrase that was coming up, I created a new thread and got the error message and then searched in Phrases and found the phrase to edit. (invalidid > *inside* Front end Error Messages [probably the place you meant for us to edit in the first place).

Anyway, so I make the change as you suggest. I test the mod with a new thread using a spam keyword. IT WORKS! Then I test with a url. IT WORKS 2! I get really excited as I think - "Finally the end of my spammer issue". BUT then, I test the 'Quick Reply" function and the mod works, but posts the message for the spammer to see, just not for other members or guests -- and the spammer doesn't get the error message. It just appears that the post worked. The other issue is that when I go to moderate the post, I cannot see it in the regular forum pages although in the New Post indicator it shows a new post - but when I click the link to the new posts, nothing shows up. I have to log into the admincp to moderate the post.

2nd. issue. So, the quick reply made me try the post reply function. It performed the say way as the quick reply.

So, long story short: This mod seems only to work on New Threads. It sort of works on replies, but not like you intended --at least for me.

If I have screwed something up, let me know. Thanks so much for this modification! Even with the two small problems I have with it, it will help slow down the spam problem.

Warm Regards,
Kether

tweakmonkey 10-28-2006 11:27 PM

Quote:

Originally Posted by kether1
Hi Tweakmonkey!

I installed this mod (3.6.0) and am having a different problem and a similar problem as the one that adwade was/is having.

1st. the mod worked just like you said it would. So I too adjusted the error message. The only problem in my Admincp >Language & Phrases > Phrase Manager > Phrase Type: (I did not have the "phrase type: Error Messages / invalidid" as a choice) SO, to find the actual phrase that was coming up, I created a new thread and got the error message and then searched in Phrases and found the phrase to edit. (invalidid > *inside* Front end Error Messages [probably the place you meant for us to edit in the first place).

I can't really explain this. I just changed the value again to confirm and for me it's where I mentioned. Here's what I changed it to and what showed up:
Quote:

If you are a new user and received this message immediately after posting a new thread, it may have to be approved before it shows up on the site. Please read this thread for more info.
I'm not sure why it's different for some people. I don't have a Front End Error Messages (I have a Front End Redirect Messages though). In Front End Redirect Messages I do not have an invalidid. Maybe it has to do with the upgrade path we've all taken since we first installed VB. I think I started with VB 3.5.2.

Quote:

Anyway, so I make the change as you suggest. I test the mod with a new thread using a spam keyword. IT WORKS! Then I test with a url. IT WORKS 2! I get really excited as I think - "Finally the end of my spammer issue". BUT then, I test the 'Quick Reply" function and the mod works, but posts the message for the spammer to see, just not for other members or guests -- and the spammer doesn't get the error message. It just appears that the post worked.
The post should be a different color indicating it's been set to Moderated. I don't know how we can flag it differently -- perhaps we could style it by adding the word "This post was moderated for *** reason" or something? See below...

Quote:

The other issue is that when I go to moderate the post, I cannot see it in the regular forum pages although in the New Post indicator it shows a new post - but when I click the link to the new posts, nothing shows up. I have to log into the admincp to moderate the post.
This sounds like another issue entirely with your Vbulletin installation. Although using the AdminCP is probably the best idea to moderate posts, you should definitely see moderated posts in threads if you're an administrator/moderator. If you set a specific reply to Moderated status (Unapprove Posts with the dropdown menu) with an administrator account does it disappear?

Quote:

2nd. issue. So, the quick reply made me try the post reply function. It performed the say way as the quick reply.

So, long story short: This mod seems only to work on New Threads. It sort of works on replies, but not like you intended --at least for me.

If I have screwed something up, let me know. Thanks so much for this modification! Even with the two small problems I have with it, it will help slow down the spam problem.

Warm Regards,
Kether
I guess the best solution would be to style the moderated post so when a user's reply is moderated it flags it clearly to the user somehow (instead of just changing the color in the CSS or however you have it styled). This is more of an issue with Vbulletin than with this plugin though. I could add an option that only flags new Threads as moderated instead of posts - that might be more effective since spammers tend to always start new threads. A quick way to do this would be to Uninstall the plugin "Auto-Moderation by Keywords and URL: Replies". Threads will still be moderated.

furst 10-29-2006 02:31 AM

Quote:

Originally Posted by tweakmonkey
Ah, so instead of moderating it, it would move it to say, a dump forum? I can probably implement that when I have time.

Thanks, I'll be looking forward to it :)

adwade 10-29-2006 04:16 AM

Quote:

Originally Posted by tweakmonkey
Are you using the Phrase Manager or the Language Manager?

I changed the message here: Languages & Phrases -> Phrase Manager -> Phrase Type: Error Messages -> invalidid

Yes, that's where I was making the changes at. It saves the msg alright, but what is going on (I think) is the error msg isn't always displayed because it's not told to do so. For instance, here's how my board is acting...

Case #1 - A Spam type NEW THREAD is created using the URL feature (i.e. [URL]) and everything seems to work just fine. In that the posting of such a msg will ellicit an error msg and mark the msg for moderation.

Case #2 - A Spam type NEW THREAD is created containing a word in the keyword list.(i.e. 'www') Error msg is generated and thread is correctly moved into awaiting moderation status.

Case #3 - A Spam type REPLY will mark the msg for moderation, but will not give an error message IF for instance you enter a LINK w/o using the URL feature -or- if you enter a LINK with the URL feature. The reply is immediately hidden from the user and awaits moderation.

Case #4 - A Spam type QUICK REPLY will mark the msg for moderation, but will not give an error message, yet the QUICK REPLY is immediately shown to the one posting it. If he reloads the page, or revisits the thread later the QUICK REPLY msg does not show up.(as it's awaiting moderation)

So from what I can tell, the MOD always works correctly to move the msg to awaiting moderation status. It's just that if/when using reply (Case #3) or quick reply (Case #4) nothing trips the error msg to be displayed to the poster.

tweakmonkey 10-29-2006 08:02 AM

Quote:

Originally Posted by adwade
Yes, that's where I was making the changes at. It saves the msg alright, but what is going on (I think) is the error msg isn't always displayed because it's not told to do so. For instance, here's how my board is acting...

Case #1 - A Spam type NEW THREAD is created using the URL feature (i.e. [URL]) and everything seems to work just fine. In that the posting of such a msg will ellicit an error msg and mark the msg for moderation.

Case #2 - A Spam type NEW THREAD is created containing a word in the keyword list.(i.e. 'www') Error msg is generated and thread is correctly moved into awaiting moderation status.

Case #3 - A Spam type REPLY will mark the msg for moderation, but will not give an error message IF for instance you enter a LINK w/o using the URL feature -or- if you enter a LINK with the URL feature. The reply is immediately hidden from the user and awaits moderation.

Case #4 - A Spam type QUICK REPLY will mark the msg for moderation, but will not give an error message, yet the QUICK REPLY is immediately shown to the one posting it. If he reloads the page, or revisits the thread later the QUICK REPLY msg does not show up.(as it's awaiting moderation)

So from what I can tell, the MOD always works correctly to move the msg to awaiting moderation status. It's just that if/when using reply (Case #3) or quick reply (Case #4) nothing trips the error msg to be displayed to the poster.


Ah, gotcha. I don't know a solution for this problem yet. Scroll up a bit to see my last reply to the other person that asked this question. The possible options I see are:
1) Change the way moderated messages are flagged to users if it's their own message (maybe style the CSS differently or something).
2) Disable the moderation feature on Replies (since most spammers tend to post new threads, at least on my forums). This can be done by uninstalling the specific plugin Auto Moderation for New Replies.

I'll try to think of a better way to implement #1. Adding another warning that a user's reply has been moderated would involve some serious code hack as far as I can tell. I only use the mod for low post counts and so far haven't run into this problem yet. My forum is relatively small though with around 110,000 posts / 280 active users (~1300 members).

adwade 10-29-2006 08:17 AM

Quote:

Originally Posted by tweakmonkey
I'll try to think of a better way to implement #1.

Well, my Case #1 & Case #2 are working as I expect they should. So 'I' don't think (from what I understand so far) anything needs changing for them. It's only my Case 3 & 4 that can leave a poster in the dark as to what's going on from their point of view.

Quote:

Adding another warning that a user's reply has been moderated would involve some serious code hack as far as I can tell.
Ohhh, that's bad news then. Sorry to learn of it...which is not to be confused with me understanding what you really mean.(i.e. complete newbie here)

Quote:

I only use the mod for low post counts and so far haven't run into this problem yet.
Understand, and I too only plan to use it for low post counts as well.

Anyway, it's a TREMENDOUS MOD! I can't wait for Nov so I can nominate it for Hack of the Month. Can one nominate a Beta product for such??

Neal-UK 10-31-2006 03:52 AM

Is there a way to stop it moderating rss feeds?

tweakmonkey 10-31-2006 10:52 AM

Quote:

Originally Posted by Neal-UK
Is there a way to stop it moderating rss feeds?

I wasn't aware it was moderating RSS feeds. I will have to look into this and get back to you.

RMS-Chef 11-17-2006 02:37 AM

Thanks for this!

Two suggestions. First, a "per forum" setting would be nice as I am not using this for SPAM issues but to block certain content. I think this would be a workaround for the RSS issues as well since I think most people have a seperate forum just for importing RSS feeds.

Second, and this is a long shot, it would be nice to be able to enter boolean-like commands in the keyword field. Examples:
-Adding quotes to a keyword to match only that word. Currently entering the word BOX seems to trigger moderation with such words as BOXING.
-Being able to use the (-) modifier. Such as WORD1,WORD2,-WORD3 and if the thread contains WORD1 or WORD2 but also WORD3 it would not trigger moderation.

Working great as is though, thanks again.

Ratchet 11-17-2006 04:25 PM

not sure if this has been pointed out yet but one way around this for the spammer is to make a legitimate post with no keyword triggers, then edit it to add the spam.

goteamsgo 12-06-2006 01:33 PM

It sounds great. I may give it a try soon.

Any comments on server performance impact?

One nice thing might be an additional option to "Apply to the Following Usergroups." So we're not using any processing power on established members who are unlikely to spam.

lukemax 12-07-2006 07:33 PM

Wow, this is cool, can I install this now, (disable it) And enable it when I need it?

Lionel 12-08-2006 03:12 PM

I just had an issue where send to friend was being exploited by unregistered to send out spam. I now made it that only registered can use send to friend, but I know that these guys will register so they keep on spamming.

Is there a way to prevent people with the minimum post to use send to friend?

Lionel 12-08-2006 03:26 PM

I suppose I could squeeze an error message between

Quote:

if ($this->registry->userinfo['posts'] < $this->registry->options['automodpostcount']) {

here

}
at the proper hook in send message????

cgchris99 02-08-2007 02:42 AM

I have the post count set to 5. And when I have new user, it automatically goes to moderated even if there are not "bad" keywords in the post?

Is this the way it is supposed to work? I thought if they had no bad keywords it would not be moderated?

Thanks for any advice

kyrnel 02-21-2007 04:34 PM

Issue: The product is working like it says, but I am running into trouble.

A legitimate thread was flagged, so I approved it, but later the poster edited the first post, so the post was flagged and went back into the moderation queue. I was not able to approve the post. Nothing I could do would remove the moderation on that post until I disabled the product.

Any ideas?

cashpath 03-06-2007 06:22 PM

Could someone tell me how to stop this from moderating RSS feeds? (The feeds are being posted by admin)

Lionel 03-13-2007 03:40 PM

I've set the number of posts to 3. Lately, they've been coming and posting like 8, 10 times in a row, therefore bypassing the safety after 3 post.

Right now, I've increase it to 10 posts which is not really fair for the good new member.

Is there a way to automatically ban based on time that posts were made? For example the guy comes and make 3 or more flagged posts in less than 10 minutes for example, then it's obvious it's a spammer trying to flood so we ban him.


All times are GMT. The time now is 06:23 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01582 seconds
  • Memory Usage 1,891KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (21)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete