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:
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:
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:
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.”
Hey shaggy is there a way we can take this one step further and maybe create a way the Super Admin can have a check box that if checked will make that field required?
I believe it s houldn't be terribly difficult but I could be wrong? <
Ay, you can if you want - I may even do it meself if I have a bit of time over the next few days - but the main purpose of this was to give people a quick & easy way to deter the spambots moreso than making those fields mandatory for all members, if you get my meaning
<
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.”
Definantly I understand and is great. Just thought the added feature would be nice. I have done it manually and maybe will take a shot at doing this. Maybe I will take a shot at it and you can correct me if I am wrong? I could use the learning experiance.<
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.”
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.”
Just a note Shaggy... Come on man, please don't leave all that blank space on the left in your code post. I'm running 1152x864 full screen browser and have to horizontal scroll way to many times for every text line in every post like this one even condensing screen size with Ctrl-Mouse Wheel Scroll!
Just editing it so " <td bgcolor=""" & strPopUpTableColor & """
Just displayed in your post as "<td bgcolor=""" & strPopUpTableColor & """ Would really help. My old eyes and hands just can't see that small text and move that much even on a 21" monitor ;-} ----------
Now about this "spam and bot registrations" thing...
If you run an NT server, an Access database, and VBscript Put this code right below your last <!--include--> line in your policy.asp page.
<% if not request.servervariables("http_referer") ="" then refer=request.servervariables("http_referer") refer= LCase(refer) ELSE refer="" end if
The "left(refer,NUMBER)" is the exact legnth from the Refer URL from the left you want to compare, so make sure the count matches the text. What this does is simply prevent people from using whatever page you want protected from entering from anying but a link from your site.
------
At the very bottom of the code, add this line to close it out.
<% else Response.Redirect "http://vales.com/problem.htm" end if %> ----------- You can Response.Redirect that problem address anywhere to any page you want. But mission acomplished, if you are not clicking the link from the site you can't do squat on a protected page.
KC, that's exactly as those lines appear in the Snitz files; were I to remove the white space before posting here, those searching for the entire line by copying it from here would never find it and would be in here moaning that my instructions are wrong.
As for your mod, we used to check the referring URL to ensure people came through policy.asp before registering; however this caused no end of problems for Norton users as Norton blocks the sending of the http_referer variable for no good reason and these forums were chock full of posts from people who were frustrated that they couldn't get past policy.asp. Also, bots can easily be rewritten to land on another page in your forum and then following your registration link.
<
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.”