Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Keyword weight based spam detector Details »»
Keyword weight based spam detector
Version: 0.1.0, by HuangA HuangA is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.7.0 Beta 5 Rating:
Released: 07-07-2008 Last Update: 07-08-2008 Installs: 40
Uses Plugins
Translations Is in Beta Stage  
No support by the author.

I coded this one because I constantly had to moderate and / delete them lengthy lame cell phone ads on vBulletin.com's forums and my own forums. You know, buy iphone, ipod touch, noika blah blah blah sony ericsson blah blah blah etc. etc. etc. email us, we're legitimate business in a country you've never heard of, blah blah blah spam.

While Akismet does work on filtering them out, some times they still leak through.

I know there's two other keyword based tools that automatically adds things to moderation queue (One from SirAdrian and one from tweakmonkey), but it doesn't work too well for me, because I run an iPhone / iPod Touch site and I can't have those keywords on auto spam for simply appearing. So, here's what I did for mine...

What does this product do?
  • Adds 1 vBulletin Options setting group, with 4 settings
  • Allows you to define a list of keywords with associated score
  • Allows you to set a threshold for automatic moderation
  • Allows you to set a threshold for automatic rejection
  • Allows you to set a post count limit for posts to be scanned
  • Adds 1 plugin which gets ran at newpost_process
  • Adds 1 plugin which gets ran at editpost_update_process

How does it work?
1) You configure your keyword list, and score weight. For example, I use this list:
Code:
Nokia|0.5
iPhone|0.5
iPod Touch|0.5
Order|0.5
HTC|0.5
Samsung|0.5
Sony Ericsson|0.5
hotmail|0.5
$|0.5
usd|0.5
url|0.3
email|0.5
The list basically means each time the plugin sees "Noika", it will get a score of 0.5, $, 0.5, etc. etc. A tally of all the score is totaled, and
2) You configure your moderation score, for example, I use 50.
3) You configure your rejection score, for example, I use 100.
4) You configure your exemption post count, for example, I use 5.

When a new post is being created (this could be a thread, or a reply, doesn't matter, they both trigger newpost_process hook), the plugin will count how many times each keyword appears, and total the score. If it is higher than or equal to the moderation score, it will tuck the post into moderation queue. If it is higher than or equal to the rejection score, a standard vBulletin error message is shown to the user.

How much overhead does this add? Realistically, not much... depending on amount of keywords used, I'd say most likely under 0.05 seconds of your CPU time for each post. If you are really that worried, you can set your exemption post count to something lower, and so lesser posts are scanned. Default is 5 right now.

This have been tested on 3.7.0 Beta 5, and 3.7.2. I see no reason why it would not work on 3.6.x series, too.

Change log
0.0.0 => 0.1.0
  • Changed error message to use vBulletin error message screen instead of die()
  • Added option for omitting after certain post count (default 5)
  • Added default values to options
  • Fixed options not appearing after product import (I forgot to export them for 0.0.0)
  • Added scanning for editing post (AJAX doesn't seem to give error... I'll work on that for 0.1.1 later)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 07-24-2008, 12:56 PM
youradhere4222 youradhere4222 is offline
 
Join Date: Sep 2007
Location: Houston, TX
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by HuangA View Post
Personally, I don't want to do that on my forum because of the possibility of false positives when I'm not around, and I could potentially ban someone who is genuinely interested in my forum before they even make their first post. But, I can see usefulness of that in some other forums, so I can certainly look into coding that some time this weekend or whenever I have time... no guarentee as to when I can push that out though.
I agree, but let's say you have a competing site: competingsite.com

If they were frequently spamming you, you could enter the keyword and other variations to automatically ban anyone who uses it. It could also be used to auto-ban those who use racial slurs or use words you prohibit in the rules.
Reply With Quote
  #13  
Old 07-24-2008, 05:20 PM
HuangA's Avatar
HuangA HuangA is offline
 
Join Date: Jun 2004
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, there are certainly benefits to it. In your described case though, I'd still take additional percautions. I have had people coming to my site and first thing thy said was something like:
Quote:
I just found this site from google, comparing to <competitor site>, this is way better and easier to use. Thank you for making this possible!!
If you do add competitor site to your keyword list, I'd recommend giving it some flexibility (ie: allow two occurances in post before it trigger moderation, and three or so before it trigger reject).

As mentioned, I'll look into coding an auto ban level during the weekend coming up, and update this again

PS: I'm considering a further "profile" system where we can create different sets of keywords/weights, so we can target spam better; but one problem I can see is if we add too many sets of profiles, the math required will probably take more CPU time... Any opinions on this, anyone?
Reply With Quote
  #14  
Old 07-29-2008, 09:11 AM
HuangA's Avatar
HuangA HuangA is offline
 
Join Date: Jun 2004
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, just reporting in that I had a very busy weekend so I did not got around to work on this during the weekend. I will try to allocate some time aside this weekend for this.
Reply With Quote
  #15  
Old 10-17-2008, 07:25 AM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hello Andy..

This is one of the bestest spam preventing mods I have seen till now and it works perfect on my 3.7.3 PL1 board. Wonder why it has so less installs.

I think people like to stay away from mods that have a BETA tag to them. I hope you remove that BETA soon please

Thank you
Reply With Quote
  #16  
Old 10-18-2008, 04:57 AM
HuangA's Avatar
HuangA HuangA is offline
 
Join Date: Jun 2004
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the feedback, and sorry to everyone as I have not had a chance to update this because of development works... I have something similar (and hopefully even better) in the workings... stay tuned
Reply With Quote
  #17  
Old 12-18-2008, 03:15 AM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is not working for me at all in 3.7.4

Quote:
Nokia|1.0
iPhone|1.0
iPod Touch|1.0
Order|1.0
HTC|1.0
Samsung|1.0
Sony Ericsson|1.0
hotmail|1.0
$|1.0
usd|1.0
url|0.3
email|1.0
Created a regular member called test (zero post count) and attmpted to post based on the keywords. I posted Nokia about 10 times, post went through fine.

Moderate Threshold Score is set to 5
Reject Threshold Score is set to 0
Spam Scanning Post Threshold is set to 5
Reply With Quote
  #18  
Old 12-18-2008, 06:27 AM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not sure why it is not working for you. Works more than great for me on 3.7.4.

Try setting "Moderate Threshold Score is set to 50" as 5 is tooo less. And try posting a real spam post, search for it.
Reply With Quote
  #19  
Old 03-25-2009, 06:41 PM
tekguru tekguru is offline
 
Join Date: May 2007
Posts: 366
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this work okay on 3.8.1?
Reply With Quote
  #20  
Old 03-26-2009, 04:43 AM
HuangA's Avatar
HuangA HuangA is offline
 
Join Date: Jun 2004
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The hooks for that haven't changed, I think you should be okay. Though, I don't honestly recall which version is the up most version number I've defined for this. If it tells you that your version is not compatabile, then you can try to edit the xml to get around the limitation, and then install it. In the worst case where it doesn't work, just uninstall it
Reply With Quote
  #21  
Old 05-15-2009, 02:58 PM
Farstate Farstate is offline
 
Join Date: Mar 2004
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great mod - works fine on 3.8.1 PL1
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:30 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.11905 seconds
  • Memory Usage 2,316KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete