Anti-spam Birthdate Add-on - Posted (9340 Views)
Support Moderator
Shaggy
Posts: 6780
6780
This is a very simple little add-on that will dramatically reduce the number of spam registrations on your forums. While it won't stop spammers from manually registering for accounts, it will stimmy the vast majority of scripts and bots out there which are pre-programmed to only complete those fields that are required on the registration form. This add-on will make the date of birth (or age, depending on your setup) field required and throw an error if it isn't completed.
First, find the following on line 346 of inc_profile.asp:
Code:
"                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Age: </font></b></td>" & vbNewLine & _
And replace it with the following:
Code:
"                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><font color=""" & strHiLiteFontColor & """>*</font> Age: </font></b></td>" & vbNewLine & _
Find the following on line 374:
Code:
"                      <td bgcolor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Birth Date: </font></b></td>" & vbNewLine & _
And replace it with the following:
Code:
"                      <td bgcolor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><font color=""" & strHiLiteFontColor & """>*</font> Birth Date: </font></b></td>" & vbNewLine & _
Find the following on lines 1150 and 1465 (which will become line 1471 after the first edit) of pop_profile.asp and on line 381 of register.asp:
Code:
if len(strMAge) > 0 then
if not isNumeric(strMAge) then
Err_Msg = Err_Msg & "<li>You must enter a numerical value for your age.</li>"
elseif strMinAge > 0 and strMAge < strMinAge then
Err_Msg = Err_Msg & "<li>You must be at least " & strMinAge & " years old.</li>"
end if
end if
And replace it with the following:
Code:
if len(strMAge) > 0 then
if not isNumeric(strMAge) then
Err_Msg = Err_Msg & "<li>You must enter a numerical value for your age.</li>"
elseif strMinAge > 0 and strMAge < strMinAge then
Err_Msg = Err_Msg & "<li>You must be at least " & strMinAge & " years old.</li>"
end if
else
if strAge = "1" then
Err_Msg = Err_Msg & "<li>You must provide your age.</li>"
elseif strAgeDOB = "1" then
Err_Msg = Err_Msg & "<li>You must provide your birth date.</li>"
end if
end if
<
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Junior Member
Zenfor
Posts: 372
372
Originally posted by AnonJr What version are you running?
I am running version 3.4.03 based on what I see in the Forum Variables Information. I don't know how I didn't do all the updates but would like to know how to get up to date. Thanks.
Posted
Forum Moderator
AnonJr
Posts: 5768
5768
If you do not have any MODs, download the latest code and follow the upgrade directions.
If you do have MODs, it will depend on how many and how keen you are on re-installing them from a clean 3.4.07.
You Must enter a message