Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Mod Idea:Total members that have visited the forum

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
weeweeslap Posted - 25 June 2008 : 10:46:47
Total members that have visited the forum in the last 24 hours: (number of people)

It would be like the active users panel but it would display everyone's screen name that has logged into the forum in the last 24 hours.
I find this feature on many forums that I visit and would like something like this for Snitz. Maybe someone can write something up and share it with all of us?
Thanks!<
12   L A T E S T    R E P L I E S    (Newest First)
KC Posted - 13 April 2009 : 12:06:39
quote:
Originally posted by weeweeslap

Thanks guys for this!
Mabe package it up and put it in the forum "Mods w/ Code" Works good!<

I think I did but I can't find it here.
No biggie, I found this topic easy enough.
weeweeslap Posted - 26 June 2008 : 16:58:59
Thanks guys for this!
Mabe package it up and put it in the forum "Mods w/ Code" Works good!<
KC Posted - 26 June 2008 : 11:34:43
Here is my code in the active_users.asp page at the top to list who's been on in the last 24 hours prior to the active uses code itself running:


<% ' *** KC display of all users on for last 24 hours ***.

'<-- variables -->
sTot=0             '<-- counter for total--|

'<-- Open DB -->
db="DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & server.MapPath ("YourDatabaseName.mdb")
set connForum = server.createobject("ADODB.Connection")
connForum.open db

'<-- Record Selection String, by Last Here Order, Decending (newest here first) -->

SQLforum="SELECT member_ID, M_LASThereDATE, M_NAME FROM FORUM_MEMBERS order by M_LASThereDATE desc"

'<-- Exectute the Above and Fetch the First Forum Record -->

set forumG=connForum.execute(SQLforum)

'<-- Now the magic... Convert the Date/Time, and only look at the DB until the Member was last on 24 hours ago -->

do while not forumG.bof and not forumG.eof and StrToDate(forumG(1))>(strForumTimeAdjust-1)

sTot = sTot+1      '<-- Increment Counter--|
numNow=forumG(0)   '<-- Current Record Member ID to Bold Current User--|

'<-- Display Record Info (Bold Current User Name)-->

if memberID=numNow then   '<-- Current Viewing Member in List, Make Bold, No Link--|%>
<B><%=forumG(2)%></B>, 
<%else             '<-- Show All the Rest with Profile Link--|%>
<a href="pop_profile.asp?mode=display&id=<%=forumG(0)%>"><%=forumG(2)%></a>, 
<%end if

forumG.movenext    '<-- Move to Next Record--|
loop

connForum.close    '<-- Close DB and Clean Up--|
set forumG=nothing
set connForum=nothing
%>
<p><B><%=stot%></b> Active Users in the last 24 hours.


Thats it.
This line does the date math and makes it fast because it stops as soon as the member list, in member last date here order, is older than 1 day ago to the minute.

do while not forumG.bof and not forumG.eof and StrToDate(forumG(1))>(strForumTimeAdjust-1)


<
Carefree Posted - 25 June 2008 : 15:16:01
I redid the recently_seen.asp so that it could be used in conjunction with active_users vs default.asp (if you so desired). It will now only display visitors within last 24 hours.

Text Copy

To use it, choose where you want it displayed (ie active_users.asp). In the includes at the beginning of the file, add this line:


<!--#INCLUDE FILE="inc_recentlyseen.asp" -->


Now, where you want the list to appear (I put it just before WriteFooter) - it is a complete table, set to 95% to match active users default, so include it OUTSIDE a table, add this line:


Call DisplayRecentlySeen(100, "simple")


The 100 limits the output to last 100 people, increase/decrease as you desire. Changing the word "simple" to "extended" will give a display showing how many hours/minutes it has been since each visitor, changing it to the word "neither" will give a display with ONLY member names, times are eliminated.

If you don't want the 24-hours' total visitors count at the end of the display, change line 128 to say:


		Response.Write  "</font>" & vbNewLine & _


Edit: Revised line 136 to not display total when view is collapsed. New version at link.<
KC Posted - 25 June 2008 : 14:30:42
Hi guys.
I got an e-mail link to this topic.
The whole thing is just tracking the last 24hr routine and displaying in the the Who's On screen involves just reading the forum database for members in the last 24 hours.
I have it posted on the snitz forums.
Just search for posts my by me, KC
<
Andy Humm Posted - 25 June 2008 : 13:36:16
I think the Recently Seen Mod might be the answer, I can not track the source of where I downloaded it from, but fortunately I found an old backup file with the appropriate zip file Your welcome to try it to see: Download link<
MaD2ko0l Posted - 25 June 2008 : 13:34:21

dim rs
set rs = server.CreateObject("adodb.recordset")
defDate = DateToStr(dateadd("h",-24,strForumTimeAdjust))

strSql = "SELECT member_id, m_name, m_lastheredate FROM " & strMemberTablePrefix & "MEMBERS where M_lastheredate >= '" & defDate & "' ORDER BY M_LASTHEREDATE DESC"
rs.Open strSql, my_Conn
%>
<table align="center" width="95%" cellspacing="1" cellpadding="3" bgcolor="<%=strTableBorderColor%>">
<tr>
<td align="left" bgcolor="<%=strHeadCellColor%>" width="100%">
<font face="<%=strDefaultFontFace%>" size="<%=strDefaultFontSize%>" color="<%=strHeadFontColor%>"><b>
Active Members Seen In the Last 24 Hours
</b></font>
</td>
</tr>
<tr>
<td align="center" bgcolor="<%=strForumCellColor%>">
<table border="0" cellpadding="0" cellspacing="5" width="100%">
<tr>
<td valign="middle" width="10%"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b>No.</b></font></td>
<td valign="middle" align="left"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b>Member Name</b></font></td>
<td valign="middle" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b>Last Seen</b></font></td>
</tr>
<%
intCounter = 1
do while not rs.EOF%>
<tr>
<td><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><%= intCounter%>.</font></td>
<td align="left"><a href="pop_profile.asp?mode=display&id=<%=rs("member_id")%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><%= rs("m_name")%></font></a></td>
<td align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
<% minutesTotal = datediff("n",strtodate(rs("m_lastheredate")),strForumTimeAdjust)
hoursTotal = int(minutesTotal / 60)
daysSince = int(hoursTotal / 24)
hoursSince = hoursTotal mod 24
minutesSince = minutestotal mod 60
if daysSince = 1 then Response.Write daysSince & " day, "
if daysSince > 1 then Response.Write daysSince & " days, "
if hoursSince = 1 then Response.Write hoursSince & " hour, "
if hoursSince > 1 then Response.Write hoursSince & " hours, "
Response.Write minutesSince
%> minutes ago.</font>
</td>
</tr>
<%
intCounter = intCounter + 1
rs.movenext
loop
rs.Close
%>
</table>
<p align="right"><a href="#top"><img src="<%= strImageURL %>icon_go_up.gif" border="0" WIDTH="15" HEIGHT="15"></a></p>
</td>
</tr>
</table>


hows that looking?
i took the code fomr the Basic Stst mod that i liked to and just tinkered with it. seems to work for me on an access db<
MaD2ko0l Posted - 25 June 2008 : 13:02:54
http://www.snitzbitz.com/mods/details.asp?Version=All&mid=148 what about modifyign this mod? its the basic stattistics mod which shows a few things like "X Members Last Seen" and "Top X Posters" where x is u can specify how many to show.

surly someone can do a littly modifying so that it will check if the lasthere date is within 24 hours<
weeweeslap Posted - 25 June 2008 : 12:49:43
yeah, him posting his code would save us lots of time
Thanks!<
Carefree Posted - 25 June 2008 : 11:29:35
Overlapping post times, Mad. I contacted KC and asked that he release his code here, will save us all some effort if he agrees.<
Carefree Posted - 25 June 2008 : 11:23:53
I can't do this right now, have too many other projects pending completion. If nobody attempts it before I finish my existing backlog, I'll see if I can do it.<
MaD2ko0l Posted - 25 June 2008 : 11:23:06
a guy called KC i think has already done somthing similar on 1 of his sites.

go here, yu may need to register to see that active users page but go here http://vales.com/elite/active_users.asp and at the top of this page its says

Active Users in the Last 24 Hours
Most Recent Visitor First

then lists the users, maybe you can email him and ask for the code that he has used.<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000 Version 3.4.07