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


All times are GMT. The time now is 05:05 AM.

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.05328 seconds
  • Memory Usage 1,748KB
  • 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
  • (4)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
  • (10)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