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 / Classic ASP versions(v3.4.XX)
 Help With Signature Block
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

stwilson
Junior Member

USA
385 Posts

Posted - 19 May 2002 :  13:54:02  Show Profile  Visit stwilson's Homepage
Here is what I am trying to do:

1. prevent users from adding URLs in their signature block
2. while still allow them to add their email address in signature block

I am on the 3.3.03 version, running on Access.

Can someone point me in the right direction?

STW.

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 19 May 2002 :  14:13:37  Show Profile
The easy solution:

open pop_profile.asp in a text editor and go to this part:
		if Len(ChkString(Request.Form("Sig"),"message")) > 255 then
Err_Msg = Err_Msg & "<li>Your signature can not be greater than 255 characters. "
Err_Msg = Err_Msg & "It now is <b>" & Len(ChkString(Request.Form("Sig"),"message")) & "</b> characters long.</li>"
end if


Add this right below it:
		if (instr(Request.Form("Sig"),"http")> 0) Or (instr(Request.Form("Sig"),"www")> 0) then
Err_Msg = Err_Msg & "<li>You're not allowed to put URLs in your signature.</li>"
end if


Now go to this part:
				if Len(Request.Form("Sig")) > 255 then
Err_Msg = Err_Msg & "<li>The signature can not be greater than 255 characters. "
Err_Msg = Err_Msg & "It now is <b>" & Len(Request.Form("Sig")) & "</b> characters long.</li>"
end if


And add this right below it:
                if (instr(Request.Form("Sig"),"http")> 0) Or (instr(Request.Form("Sig"),"www")> 0) then
Err_Msg = Err_Msg & "<li>You're not allowed to put URLs in your signature.</li>"
end if


I tested it and it works just fine. Since e-mail addresses don't use http or www this will filter out URLs but leave e-mail addresses alone.
Sorry for the lack of line numbers but the only version of the forums that I have on my computer right now are modded so the line numbers won't help much.




http://www.frutzle.com

Snitz Exchange | Do's and Dont's
Go to Top of Page

stwilson
Junior Member

USA
385 Posts

Posted - 20 May 2002 :  03:47:19  Show Profile  Visit stwilson's Homepage
Roland,

Thank you for your reply. It looks good. You made it look so simple. Thanks.

STW

Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 20 May 2002 :  06:06:13  Show Profile
quote:

Thank you for your reply. It looks good. You made it look so simple. Thanks.



You're welcome.
It actually is quite simple because it's pretty much like the other validation parts




http://www.frutzle.com

Snitz Exchange | Do's and Dont's
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.46 seconds. Powered By: Snitz Forums 2000 Version 3.4.07