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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Current Version (Old)
 ID character length restraints
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ribkick
Junior Member

USA
296 Posts

Posted - 20 June 2001 :  19:39:10  Show Profile
Desire: To limit members ID name length to 15 characters. Anything longer throws the other columns off the page.

I have found one instance in pop_profile that calls the limit at 25 (name="Name" size="25") but want to know if this is the only edit I need to make throughout the software package files to achieve the 15 limit.

Thanks in advance.....

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 20 June 2001 :  20:46:08  Show Profile
Are you wanting to have this limit when members register, or only when existing members names are displayed?
Go to Top of Page

Ribkick
Junior Member

USA
296 Posts

Posted - 21 June 2001 :  10:04:49  Show Profile
Hi Richard, during the registration process. That I feel is the first cut-off point to avoid/curtail longer user names. The way I see it, you can't change your user name without re-registering anyway. A longer name would then still not be permitted.

On the other hand, if there was something I could code in that would wrap a user name longer than 15 characters to a second line, that would solve the problem as well although not make it as reader friendly.

Any ideas?

Go to Top of Page

bjlt
Senior Member

1144 Posts

Posted - 21 June 2001 :  11:02:55  Show Profile
quote:

Are you wanting to have this limit when members register, or only when existing members names are displayed?




Richard, i'd like to take this chance to ask a question related. how to limit the code range one can used in his user name? like the old domain name system, only azAZ-0-9 are allowed. I just want my user to use ascii code only, some people may not read it if they use asian languages.

do you have any idea? will it work if i define it in sql server field type?

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 21 June 2001 :  16:41:39  Show Profile
I did that exact think on my test forum. I am only allowing A-Z, a-z, the _ character a spaces.

here is the code I added to inc_functions.asp:

Function IsAlphaNumeric(fString)
for i = 1 to Len(fString)
strChar = Asc(Mid(fString,i,1))
If (strChar >= 65 and strChar <= 90) or (strChar >= 97 and strChar <= 122) or (strChar >= 48 and strChar <= 57) or (strChar= 32) or (strChar = 95) then
IsAlphaNumeric = True
else
IsAlphaNumeric = False
Err_Msg = Err_Msg & "<li>You have entered an invalid character in your username, for more information see <a href=""JavaScript:openWindow6('faq.asp#usernames')"">here</a>.</li>"
exit function
end if
next
end Function


and then added this to register.asp:

	IsAlphaNumeric(Request.Form("Name"))


For what you are wanting just take out the or (strChar= 32) or (strChar = 95) from the function above.
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 21 June 2001 :  16:48:55  Show Profile
Ribkick, in inc_profile.asp you can change:

<INPUT name="Name" size="25"  value="<% =ChkString(rs("M_NAME"), "display") %>">


to:

<INPUT name="Name" size="15" maxLength="15" value="<% =ChkString(rs("M_NAME"), "display") %>">


That will limit the amount of characters that can be entered in that input box.
Go to Top of Page

Ribkick
Junior Member

USA
296 Posts

Posted - 21 June 2001 :  17:38:09  Show Profile
Perfect! Thank you again Richard

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 21 June 2001 :  21:00:43  Show Profile
you're welcome
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.33 seconds. Powered By: Snitz Forums 2000 Version 3.4.07