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 Discussions (General)
 BUG + FIX: pop_profile.asp
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

David K
Junior Member

494 Posts

Posted - 18 November 2002 :  09:58:11  Show Profile  Send David K an AOL message  Send David K an ICQ Message  Send David K a Yahoo! Message
If link1 is empty but link2 isn't, it says that there are no links specified!
Original code (line 695in an unchanged file & line 472):
if Trim(rs("M_LINK1")) <> "" and lcase(trim(rs("M_LINK1"))) <> "http://" and Trim(lcase(rs("M_LINK1"))) <> "https://" then 
	Response.Write	"                      <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & ChkString(rs("M_LINK1"), "display") & """ target=""_blank"">" & ChkString(rs("M_LINK1"), "display") & "</a> </font></td>" & vbNewLine
	if Trim(rs("M_LINK2")) <> "" and lcase(trim(rs("M_LINK2"))) <> "http://" and Trim(lcase(rs("M_LINK2"))) <> "https://" then
		Response.Write	"                    </tr>" & vbNewLine & _
				"                    <tr>" & vbNewLine & _
				"                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" nowrap width=""10%""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> </font></b></td>" & vbNewLine & _
				"                      <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & ChkString(rs("M_LINK2"), "display") & """ target=""_blank"">" & ChkString(rs("M_LINK2"), "display") & "</a> </font></td>" & vbNewLine
	end if
else
	Response.Write	"                      <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>No link specified...</font></td>" & vbNewLine
end if


Changed version (too many changes to specify)
if (Trim(rs("M_LINK1")) <> "" and lcase(trim(rs("M_LINK1"))) <> "http://" and Trim(lcase(rs("M_LINK1"))) <> "https://") or (Trim(rs("M_LINK2")) <> "" and lcase(trim(rs("M_LINK2"))) <> "http://" and Trim(lcase(rs("M_LINK2"))) <> "https://")  then 
	if Trim(rs("M_LINK1")) <> "" and lcase(trim(rs("M_LINK1"))) <> "http://" and Trim(lcase(rs("M_LINK1"))) <> "https://"  then 
		Response.Write	"                      <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & ChkString(rs("M_LINK1"), "display") & """ target=""_blank"">" & ChkString(rs("M_LINK1"), "display") & "</a> </font></td>" & vbNewLine
	end if
	if (Trim(rs("M_LINK1")) <> "" and lcase(trim(rs("M_LINK1"))) <> "http://" and Trim(lcase(rs("M_LINK1"))) <> "https://") and (Trim(rs("M_LINK2")) <> "" and lcase(trim(rs("M_LINK2"))) <> "http://" and Trim(lcase(rs("M_LINK2"))) <> "https://") then	
		Response.Write	"                    </tr>" & vbNewLine & _
				"                    <tr>" & vbNewLine & _
				"                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" nowrap width=""10%""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> </font></b></td>" & vbNewLine
	end if
	if Trim(rs("M_LINK2")) <> "" and lcase(trim(rs("M_LINK2"))) <> "http://" and Trim(lcase(rs("M_LINK2"))) <> "https://" then
		Response.Write	"                      <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & ChkString(rs("M_LINK2"), "display") & """ target=""_blank"">" & ChkString(rs("M_LINK2"), "display") & "</a> </font></td>" & vbNewLine
	end if
else
	Response.Write	"                      <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>No link specified...</font></td>" & vbNewLine
end if


I removed 5 tabs from each line (in the case of line 695) or 6 (in line 472) to increase visability, Plase restore them after you paste the code in your file.
This change removes this bug compleatly from profile display.

Edited by - David K on 18 November 2002 10:05:47

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 18 November 2002 :  12:05:08  Show Profile  Visit HuwR's Homepage
I don't think this is strictly a bug, more a matter of opinion, I like the fact that to remove my links I only have to delete one of them, it is fair to assume that most people would normally fill in link1 before filling in link2
Go to Top of Page

David K
Junior Member

494 Posts

Posted - 18 November 2002 :  12:59:01  Show Profile  Send David K an AOL message  Send David K an ICQ Message  Send David K a Yahoo! Message
I made this change to accomedate to situations where someone deletes link 1 and then he\she doesn't need to move link 2 to link 1.
If deleating link one doesn't show the second, it should be mentioned in the editing form.
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.21 seconds. Powered By: Snitz Forums 2000 Version 3.4.07