MyBB Community Forums

Full Version: Are You Getting Annoyed With Annoying Viagra Spammers? [HERE'S THE FIX!]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hello,
My forum had been spammed for months with those annoying bots selling viagra. Just today i made a small mod to the newthread.php so if someone uses the word viagra it is sent to your trash forum.

Here i just made some tiny edit to the default MyBB newthread.php file.
Make a backup of your current newthread.php and replace it with this one.

Then edit $TrashID and replace 110 with your trash forums ID and if you want change viagra in $BadWord to whatever you want
Now make your own edits(these are found at the top of the page):
$TrashID = '110'; Replace 110 with your trash forums ID
$BadWords = "viagra"; Replace with the word you don't want people using on your board/forum.
$postlimit = '5000000'; Replace 5000000 with what you want to be the max post count to check e.g if $postlimit = 50 then it will only check peoples posts if their postcount is less than 50.

[attachment=21328]

Soon i will be adding check their post count, if its less than 50 then check for viagra if its more then just parse it...
Enjoy and say thanks if you liked!
I forgot to mention it was made for MyBB 1.6.1. Feel free to try it on another version Big Grin

Do not download the below file
Download newthread.zip from above!
You would be better doing this with a plugin. Also, in MyBB you can already restrict words Toungue
Yeah i just got this today. Banned and purged. Regardless, it sucks because i have my website feeding updates from the new threads to the twitter account, so it sucks because now i have to delete new twitter updates. Regardless, good idea and ill be sure to check this out.
I know you can add word filters but that is just replacing it doesn't actually get rid of the spam it just swaps the word viagra with ****.
So the spammer is still successful.
I heard plugins take up allot of resources on your server that is why i have decided not to make plugins.
I've not looked at any plugin but i was told "the plugins "follow" mybb on all pages resulting in them being opened all the time".
Or something like that ;D
Nope, plugins run on the pages you request them to, so you could tell it to only run your function when the user tries to post.

The resources used are usually fairly low if you are only running a simple function Smile
(2011-01-18, 03:25 PM)Tom K. Wrote: [ -> ]Nope, plugins run on the pages you request them to, so you could tell it to only run your function when the user tries to post.

The resources used are usually fairly low if you are only running a simple function Smile

Alright well in that case i may change this to a plugin Smile.
I'm just making a small mod now for post count and i found out it skips out the first word so if they start the post with viagra then it will miss it now i've fixed all Big Grin
Love the idea! Make this a plugin and I'm all over it... Big Grin

In the settings just have a place where we could add in several words, comma separated or whatever. Viagra isn't the only word we should ban.
(2011-01-18, 03:21 PM)K1LL3RCL0WN Wrote: [ -> ]I heard plugins take up allot of resources on your server that is why i have decided not to make plugins.

Plugins in themselves won't inherently take up a lot of resources, but a badly written/intensive plugin may do.
Make this into a plugin and I'm using it. Smile
Give me some time i have allot of projects i am working on just PM me if u want me to PM you when i have made it in to a plugin Smile
Pages: 1 2 3