Sinister
02-03-2001, 12:33 PM
Hi!
I search for a special spam-protection: A user may only post, if he enters more than x words OR y letters...
Do you know such a hack?
make a new template called error_spam (or whatever) and put in your error text, and then open up newreply.php and find
if ($message=="") {
echo standarderror($bbtitle,gettemplate("error_nosubject",0));
exit;
}
and under it add
$rat_numchars = "30"; #change me
if (strlen($message) < $rat_numchars) {
echo standarderror($bbtitle,gettemplate("error_spam",0));
exit;
}
so if its under 30 characters it'll print the error_spam template.
for newthread.php, find
// check for subject and message
if (trim($subject)=="" or trim($message)=="") {
echo standarderror($bbtitle,gettemplate("error_nosubject",0));
exit;
}
and under it put in
$rat_numchars = "30"; #change me
$rat_message = trim($message);
if (strlen($rat_message) < $rat_numchars) {
echo standarderror($bbtitle,gettemplate("error_spam",0));
exit;
}
not tested btw ;P
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.