Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Bug Reports (Closed)
 Use CInt() function with strMAge
 Forum Locked  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Image
Average Member

Canada
574 Posts

Posted - 15 October 2006 :  20:10:39  Show Profile  Visit Image's Homepage  Send Image an ICQ Message
i have to place cInt in front of strMAge
if i do not want member registered if he is not older than 13 years

			elseif strMinAge > 0 and cInt(strMAge) < strMinAge then
				Err_Msg = Err_Msg & "<li>You must be at least " & strMinAge & " years old to join this forum.</li>"
<

Edited by - AnonJr on 17 March 2009 18:51:18

Davio
Development Team Member

Jamaica
12212 Posts

Posted - 15 October 2006 :  21:21:15  Show Profile
Want to give us more info?

- What error you ran into?
- Which page you got this error on?
- What file you suggesting to make these changes to?<

Support Snitz Forums
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 15 October 2006 :  23:45:34  Show Profile
It's in register.asp, looks like something that was added in v3.4.06, I can't find it in v3.4.05

Doesn't look that feature is currently working on this forum. I was just able to register a new user without entering anything for birthday, just left it as the default.

And, you get the following error if you leave all the fields blank, there should be something in place to prevent it (there used to be):

Microsoft VBScript runtime error '800a0009' 

Subscript out of range: '[number: 1]' 

/forum/register.asp, line 270
<
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 16 October 2006 :  06:07:41  Show Profile
That error you're getting, Richard, I think is related to the e-mail filter Huw added here; the changes I made for the DOB and age don't use arrays.

As for Image's suggested change - I haven't run into it yet myself and nobody else did when we were testing it but I think what he's getting at is that there may be occassion when that check could return a type mismatch error as strMAge may be a string rather than a numerical value on a forum that uses age instead of DOB. As I said, though, I haven't seen it happen so it probably needs some more testing to confirmit as a bug. It's not going to break anything if that change is made to register.asp and pop_profile.asp (in 2 places), though.

<

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.”
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20497 Posts

Posted - 16 October 2006 :  06:44:39  Show Profile  Visit HuwR's Homepage
that error would indicate that your email address did not have an @ in it ?<
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 16 October 2006 :  07:53:16  Show Profile
Huw, that error Richard got occurs if the e-mail field is left blank or if an invalid address (no @) is entered.

<

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.”
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 19 October 2006 :  19:17:01  Show Profile
I can confirm, at least on this forum, that it currently lets you register even if you haven't specified your birthdate (even though it's setup to only allow those 13 and older to register).<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20497 Posts

Posted - 19 October 2006 :  19:45:24  Show Profile  Visit HuwR's Homepage
quote:
Originally posted by RichardKinser

I can confirm, at least on this forum, that it currently lets you register even if you haven't specified your birthdate (even though it's setup to only allow those 13 and older to register).


Isn't that because DOB is not compulsary, and is also not the same problem that Image is reporting.
You can't really restrict registration based on age if supplying Age or DOB is voluntary<
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 19 October 2006 :  20:14:57  Show Profile
I assumed it was related. Seems like if there is going to be functionality to restrict users by their age, then the mechanism for determining that age should be required.<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20497 Posts

Posted - 19 October 2006 :  20:40:53  Show Profile  Visit HuwR's Homepage
quote:
Seems like if there is going to be functionality to restrict users by their age, then the mechanism for determining that age should be required.
Yes, I would agree, but it is not related to Images error, it is a separate issue entirely, but one that should be addressed none the less<
Go to Top of Page

Davio
Development Team Member

Jamaica
12212 Posts

Posted - 08 January 2008 :  15:48:42  Show Profile
In pop_profile.asp line 1155 and register.asp line 384, change the following from this:
elseif strMinAge > 0 and strMAge < strMinAge then
to this:
elseif strMinAge > 0 and CInt(strMAge) < strMinAge then


In inc_profile.asp, BEFORE line 345, add the following code in red:
			"                    </tr>" & vbNewLine
end if
if strMinAge > 0 then strReq = "<font color=""" & strHiLiteFontColor & """>*</font>"
if strAge = "1" then
	Response.Write	"                    <tr>" & vbNewLine & _
Add the code in red, on lines 347 and 375 (lines wrapped to keep this post short):
"<td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b>
<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & strReq & " Age: </font></b></td>" & vbNewLine & _

"<td bgcolor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b>
<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & strReq & " Birth Date: </font></b></td>" & vbNewLine & _
<

Support Snitz Forums

Edited by - Davio on 08 January 2008 15:50:03
Go to Top of Page

Davio
Development Team Member

Jamaica
12212 Posts

Posted - 08 January 2008 :  15:50:39  Show Profile
Fixed in version 3.4.07.<

Support Snitz Forums
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2019 Snitz™ Communications Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000 Version 3.4.07