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: MOD Implementation
 Active Users OS/Browser Unknown Problem Solved.
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

zoomdubai
Starting Member

25 Posts

Posted - 14 September 2002 :  07:05:47  Show Profile  Visit zoomdubai's Homepage
Hi all, from many days in my Active_users.asp all guest/members were being shown as Unknown/Unknown, so i changed my function fUserAgent(ua) to this below.. and it worked fine for me.. !

If your active users also shows Unkown OS & Browser just replace the function and it'll work well!


function fUserAgent(ua)
Dim UAgent
UAgent = ua
if instr(UAgent, "Opera") then
if instr(UAgent, "Opera 3.") then
strBrowser = "Opera 3.x"
elseif instr(UAgent, "Opera 4.") then
strBrowser = "Opera 4.x"
elseif instr(UAgent, "Opera 5.") then
strBrowser = "Opera 5.x"
elseif instr(UAgent, "Opera 6.") then
strBrowser = "Opera 6.x"
else
strBrowser = "Opera"
end if
elseif instr(UAgent, "MSIE") then
if instr(UAgent, "MSIE 6.") then
strBrowser = "Microsoft IE 6.x"
elseif instr(UAgent, "MSIE 5.") then
strBrowser = "Microsoft IE 5.x"
elseif instr(UAgent, "MSIE 4.") then
strBrowser = "Microsoft IE 4.x"
elseif instr(UAgent, "MSIE 3.") then
strBrowser = "Microsoft IE 3.x"
if instr(UAgent, "MSIE 3.02") then
strBrowser = "Microsoft IE 3.02"
end if
else
strBrowser = "Microsoft IE"
end if
elseif instr(UAgent, "Mozilla") and instr(UAgent, "compatible") = 0 then
if instr(UAgent, "Netscape7") then
strBrowser = "Netscape 7.x"
elseif instr(UAgent, "Netscape6") then
strBrowser = "Netscape 6.x"
elseif instr(UAgent, "Mozilla/4") then
strBrowser = "Netscape Navigator 4.x"
elseif instr(UAgent, "Mozilla/3") then
strBrowser = "Netscape Navigator 3.x"
elseif instr(UAgent, "Netscape") then
strBrowser = "Netscape"
else
if instr(UAgent, "Mozilla/5") then
strBrowser = Mid(UAgent, instr(UAgent, "rv:")+3)
strBrowser = Mid(strBrowser, 1, instr(strBrowser, ")"))
strBrowser = Mid(strBrowser, 1, Len(strBrowser)-1)
strBrowser = "Mozilla " & strBrowser
else
strBrowser = "Mozilla"
end if
end if
else
strBrowser = fLang(strLangMOD_Ls3kAU_01150)
end if

if instr(UAgent, "Windows 95") or instr(UAgent, "Win95") then
strSystem = "Windows 95"
elseif instr(UAgent, "Win 9x 4.90") then
strSystem = "Windows ME"
elseif instr(UAgent, "Windows 98") or instr(UAgent, "Win98") then
strSystem = "Windows 98"
elseif instr(UAgent, "Windows 3.1") or instr(UAgent, "Win16") then
strSystem = "Windows 3.x/Windows NT 3.x"
elseif instr(UAgent, "NT 5.0") or instr(UAgent, "Windows 2000") then
strSystem = "Windows 2000"
elseif instr(UAgent, "NT 5.1") or instr(UAgent, "Windows XP") then
strSystem = "Windows XP"
elseif instr(UAgent, "NT") or instr(os, "NT") then
strSystem = "Windows NT"
elseif instr(UAgent, "Mac") then
strSystem = "Mac"
if instr(UAgent, "PowerPC") or instr(UAgent, "PPC") then
strSystem = "Mac PPC"
elseif instr(UAgent, "68000") or instr(UAgent, "68K") then
strSystem = "Mac 68K"
end if
elseif instr(UAgent, "Linux") then
strSystem = "Linux"
elseif instr(UAgent, "X11") then
strSystem = "UNIX"
else
strSystem = fLang(strLangMOD_Ls3kAU_01150)
end if
fUserAgent = strSystem & "<br>" & strBrowser
end function

Edited by - zoomdubai on 14 September 2002 07:07:13

masterao
Senior Member

Sweden
1678 Posts

Posted - 14 September 2002 :  07:22:51  Show Profile  Visit masterao's Homepage
Just for curiosity, zoomdubai, which server (and os version) are you running your forum on?


Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod
Go to Top of Page

juuso2
Starting Member

19 Posts

Posted - 14 September 2002 :  07:59:52  Show Profile
Thanks zoomdubai, it worked fine for me.. !
Go to Top of Page

zoomdubai
Starting Member

25 Posts

Posted - 15 September 2002 :  05:17:21  Show Profile  Visit zoomdubai's Homepage
runnning on Windows 2000 n SQL 2000.

Welcome juuso2
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 15 September 2002 :  05:59:57  Show Profile  Visit masterao's Homepage
Thanks for the info, zoomdubai.

I think that your change should go into the next point release by Nathan, as your suggested change will work for those who didn't have a problem with that function.


Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod
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