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 MOD-Group
 MOD Add-On Forum (W/O Code)
 Active User MOD - members only
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

wii
Free ASP Hosts Moderator

Denmark
2632 Posts

Posted - 27 December 2004 :  07:05:32  Show Profile
Would it be hard to change the code in active users to only count members (not guests) ? If no, then where and how.

Thanks a lot.

masterao
Senior Member

Sweden
1678 Posts

Posted - 27 December 2004 :  09:57:21  Show Profile  Visit masterao's Homepage
I don't think so. You have to change the code in active_users.asp, inc_activeusers.asp and in inc_func_common.asp (the ActiveUserTracker() sub and the chkAURecord function).

Look for the code which calls for guests (it is commented where).

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

wii
Free ASP Hosts Moderator

Denmark
2632 Posts

Posted - 28 December 2004 :  05:31:42  Show Profile
Thanks
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 28 December 2004 :  13:40:54  Show Profile  Visit masterao's Homepage
No problems. I hope that you get it to work as you want it to.

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

wii
Free ASP Hosts Moderator

Denmark
2632 Posts

Posted - 09 February 2005 :  11:43:02  Show Profile
Ok, how do I change the active users record to only count the record of members, not guests? Often a spider comes by and I would have 139 online users, where the highest member count I´ve ever seen is around 15.

I see this in: inc_func_common.asp:

function chkAURecord(intTotalActiveUsers)
if cInt(intTotalActiveUsers) > cInt(intAURecord) then 'We have a new record!!! :)
'Check to see if it *Really* is a record, or if Application varaibles just got reset
strSql = "SELECT C_VALUE FROM " & strTablePrefix & "CONFIG_NEW WHERE C_VARIABLE = 'intAURecord'"
set rs = my_conn.execute (strSql)
intOldRecord = cint(rs("C_VALUE"))
rs.close
set rs = nothing
if cInt(intOldRecrod) > cInt(intTotalActiveUsers) then
'Oopsi, this was a false alarm
strSql = "SELECT C_VALUE FROM " & strTablePrefix & "CONFIG_NEW WHERE C_VARIABLE = 'strAURecordDate'"
set rs = my_conn.execute (strSql)
strOldDate = rs("C_VALUE")
rs.close
set rs = nothing
Application(strCookieURL & "INTAURECORD") = intOldRecord
Application(strCookieURL & "STRAURECORDDATE") = strOldDate
intAURecord = intOldRecord
strAURecordDate = strOldDate
else
my_conn.execute ("UPDATE " & strTablePrefix & "CONFIG_NEW SET C_VALUE = '" & cstr(intTotalActiveUsers) & "' WHERE C_VARIABLE = 'intAURecord'")
my_conn.execute ("UPDATE " & strTablePrefix & "CONFIG_NEW SET C_VALUE = '" &DateToStr(strForumTimeAdjust) & "' WHERE C_VARIABLE = 'strAURecordDate'")
intAURecord = intTotalActiveUsers
strAURecordDate = DateToStr(strForumTimeAdjust)
Application(strCookieURL & "INTAURECORD") = intTotalActiveUsers
Application(strCookieURL & "STRAURECORDDATE") = DateToStr(strForumTimeAdjust)
end if
end if
end function
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 09 February 2005 :  19:42:24  Show Profile  Visit masterao's Homepage
I thik the easiest would be to change how the function is called. Look for the following in inc_activeusers.asp:

'## Ls3k - Now lets count those peskey guests.
strSql = "SELECT COUNT(AU_IP) AS CNT FROM " & strTablePrefix & "ACTIVE_USERS WHERE MEMBER_ID = -1"
set rs = my_conn.execute (strSql)
intActiveGuests = rs("CNT")
rs.close
set rs = nothing
intTotalActiveUsers = intTotalActiveUsers + intActiveGuests


Add the red line (see below) before the last line in that code section:


set rs = nothing
intTotalActiveMembers = intTotalActiveUsers
intTotalActiveUsers = intTotalActiveUsers + intActiveGuests


Then, look for the following:

'## Ls3k - Ok, now it is time to check the record, cause it would be cool if we broke it!
chkAURecord(intTotalActiveUsers)[size=1]


Change chkAURecord(intTotalActiveUsers) to chkAURecord(intTotalActiveMembers)

That should make it so that it only counts members and not guests.

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

wii
Free ASP Hosts Moderator

Denmark
2632 Posts

Posted - 10 February 2005 :  02:53:57  Show Profile
Wow, that was simple.

Thanks
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 10 February 2005 :  08:38:48  Show Profile  Visit masterao's Homepage
You're welcome.

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

masterao
Senior Member

Sweden
1678 Posts

Posted - 15 February 2005 :  13:48:28  Show Profile  Visit masterao's Homepage
UnderRated, you posted this in the wrong forum. You should have posted this in the Help: MOD Implementation as this isn't the help forum. Post there instead and I will help you.

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