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

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 get browser type and use in if and then statements
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

weeweeslap
Senior Member

USA
1077 Posts

Posted - 20 April 2004 :  20:17:16  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message
hi.
I need to be able to get what browser type a user is using on my site, active users mod displays it, but I need to see that if the browser is that of opera, to display a basic form of the username in topic,asp or else display the modded code.
like this for example:
----------------------------------------------------------

if browser is opera then
response.write"                <p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b><span class=""spnMessageText"">" & profileLink(ChkString(Reply_MemberName,"display"),Reply_Author) & "</span></b></font><br />" & vbNewLine

else

response.write"                <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b><span class=""spnMessageText"" style=""width:0; height:0; " & Reply_MemberGlowText & """>" & profileLink(ChkString(Reply_MemberName,"display"),Reply_Author) & "</span></b></font><br />" & vbNewLine
end if

----------------------------------------------------------
Reason for this is because opera does not display the username nor glow of the user nor names without the glow. And the one without the glow code, it displays fine. Can anyone help me with the code to get the browser type and then incorporate the info into if and then statements?
This is supposed to go in topic.asp in both places of the first post and replies are displayed.
Thanks in advanced.

coaster crazy

The Impact
Junior Member

Australia
398 Posts

Posted - 20 April 2004 :  21:17:29  Show Profile
I've put a quick way below. It does a check for Opera is in the HTTP_USER_AGENT.
if InStr(Request.ServerVariables("HTTP_USER_AGENT"),"Opera") then
   response.write"                <p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b><span class=""spnMessageText"">" & profileLink(ChkString(Reply_MemberName,"display"),Reply_Author) & "</span></b></font><br />" & vbNewLine
else
   response.write"                <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b><span class=""spnMessageText"" style=""width:0; height:0; " & Reply_MemberGlowText & """>" & profileLink(ChkString(Reply_MemberName,"display"),Reply_Author) & "</span></b></font><br />" & vbNewLine
end if
Hope that works ok for you, good job with the site upgrades as well !

Edited by - The Impact on 20 April 2004 21:18:53
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 21 April 2004 :  03:48:25  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message
hey!
Thanks for fixing that for me. It worked out great. I also fixed it for the topic maker. I was trying to paste the same code into the part where the first post is made, 30 min later remembered it was a little diff words in the coding for it. All fixed now! Thanks again for helping and also thanks for being a long time standing member there

coaster crazy
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.31 seconds. Powered By: Snitz Forums 2000 Version 3.4.07