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/Code)
 ADDON: Idle Time for Active Users Mod
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Jeepaholic
Average Member

USA
697 Posts

Posted - 18 June 2001 :  13:44:32  Show Profile  Visit Jeepaholic's Homepage
Did this a while back and forgot to share the code. Essentially, it adds a column next to the "Online Time" called "Idle Time". This displays how long a user has been inactive...

Live DEMO: http://www.jeepaholics.com/citizensband/forum/active_users.asp

Code is below, find similar code and you should easily notice the differences:

File: active_users.asp

<td bgcolor="<% =strHeadCellColor %>" align=center valign=top nowrap><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>"><B>Logged On</B></FONT></td>
<td bgcolor="<% =strHeadCellColor %>" align=center valign=top nowrap><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>"><B>Last Active</B></FONT></td>
<td bgcolor="<% =strHeadCellColor %>" align=center valign=top nowrap><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>"><B>Online Time</B></FONT></td>
<td bgcolor="<% =strHeadCellColor %>" align=center valign=top nowrap><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>"><B>Idle Time</B></FONT></td>


File: active_users.asp

strRSCheckedIn = rs("CheckedIn")
strOnlineLastDateChecked = rs("LastChecked")
strOnlineDateCheckedIn = StrToDate(strRSCheckedIn)
strOnlineLastDateChecked = StrToDate(strOnlineLastDateChecked)

strOnlineTotalTime = DateDiff("n",strOnlineDateCheckedIn,strOnlineLastDateChecked)

If strOnlineTotalTime > 60 then
' they must have been online for like an hour or so.
strOnlineHours = 0
do until strOnlineTotalTime < 60
strOnlineTotalTime = (strOnlineTotalTime - 60)
strOnlineHours = strOnlineHours + 1
loop
strOnlineTotalTime = strOnlineHours & " Hours " & strOnlineTotalTime & " Minutes"
Else
strOnlineTotalTime = strOnlineTotalTime & " Minutes"
End If


strOnlineIdleTime = DateDiff("n",strOnlineLastDateChecked,strForumTimeAdjust) & " Minutes"


File: active_users.asp

<td align="center" valign="middle" width="100" nowrap><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><%=strOnlineDateCheckedIn%></FONT></td>
<td align="center" valign="middle" width="100" nowrap><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><%=strOnlineLastDateChecked%></FONT></td>
<td align="center" valign="middle" width="100" nowrap><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><%=strOnlineTotalTime%></FONT></td>
<td align="center" valign="middle" width="100" nowrap><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><%=strOnlineIdleTime%></FONT></td>


Al Bsharah
Jeepaholics Anonymous

Edited by - Jeepaholic on 18 June 2001 13:45:43

RDoGG™
Junior Member

USA
329 Posts

Posted - 21 June 2001 :  16:06:19  Show Profile  Visit RDoGG™'s Homepage  Send RDoGG™ an AOL message  Send RDoGG™ a Yahoo! Message
can u make the whole code (original + your revision) into a .TXT file?

thanks.

btw, my email is RDoGG2k1@hotmail.com if u wanna email it to me.

Go to Top of Page

Jeepaholic
Average Member

USA
697 Posts

Posted - 22 June 2001 :  13:56:35  Show Profile  Visit Jeepaholic's Homepage
Don't seem to have my original anymore, but it should be included in the download. Here's my version though:
http://www.jeepaholics.com/citizensband/forum/active_users.txt

Al Bsharah
Jeepaholics Anonymous
Go to Top of Page

RDoGG™
Junior Member

USA
329 Posts

Posted - 22 June 2001 :  15:03:30  Show Profile  Visit RDoGG™'s Homepage  Send RDoGG™ an AOL message  Send RDoGG™ a Yahoo! Message
thanks.

quote:

Don't seem to have my original anymore, but it should be included in the download. Here's my version though:
http://www.jeepaholics.com/citizensband/forum/active_users.txt

Al Bsharah
Jeepaholics Anonymous



Go to Top of Page

Freeman II
Junior Member

232 Posts

Posted - 23 June 2001 :  20:30:12  Show Profile
i installed this mod on my forum and it keeps saying idle time -300 Minutes for everything

you know whats wrong?

Go to Top of Page

RDoGG™
Junior Member

USA
329 Posts

Posted - 24 June 2001 :  09:10:38  Show Profile  Visit RDoGG™'s Homepage  Send RDoGG™ an AOL message  Send RDoGG™ a Yahoo! Message
quote:

i installed this mod on my forum and it keeps saying idle time -300 Minutes for everything

you know whats wrong?





Go to Top of Page

XavierSlater
Junior Member

United Kingdom
137 Posts

Posted - 24 June 2001 :  12:36:25  Show Profile  Visit XavierSlater's Homepage
I got a default Idle time of 480 Minutes.

Could this be related to the GMT offset?

Go to Top of Page

Jeepaholic
Average Member

USA
697 Posts

Posted - 24 June 2001 :  12:50:22  Show Profile  Visit Jeepaholic's Homepage
Yikes. Are you guys using the first post to modify your active_users.asp file, or are you just dumping my entire file in place?

This one's gonna be tough for me to figure out. I pretty much just plugged some things in place and it took care of itself...super easy mod for me. Maybe someone else can shed a little more light?

Al Bsharah
Jeepaholics Anonymous
Go to Top of Page

Freeman II
Junior Member

232 Posts

Posted - 24 June 2001 :  13:21:46  Show Profile
i use the one from your first post
i think the problem is this line

strOnlineIdleTime = DateDiff("n",strOnlineLastDateChecked,strForumTimeAdjust) & " Minutes"

you can test it by setting your forum time to -5 hours
you will get - 300 (60minx5hours) min. idle time for everyone

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