2011-01-18, 02:58 PM
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
Do not download the below file
Download newthread.zip from above!
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
Do not download the below file
Download newthread.zip from above!