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)
 Mod Idea:Total members that have visited the forum
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

weeweeslap
Senior Member

USA
1077 Posts

Posted - 25 June 2008 :  10:46:47  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message  Reply with Quote
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!<

coaster crazy

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 25 June 2008 :  11:23:06  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
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.<

© 1999-2010 MaD2ko0l
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 25 June 2008 :  11:23:53  Show Profile  Reply with Quote
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.<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 25 June 2008 :  11:29:35  Show Profile  Reply with Quote
Overlapping post times, Mad. I contacted KC and asked that he release his code here, will save us all some effort if he agrees.<
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 25 June 2008 :  12:49:43  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message  Reply with Quote
yeah, him posting his code would save us lots of time
Thanks!<

coaster crazy
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 25 June 2008 :  13:02:54  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
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<

© 1999-2010 MaD2ko0l
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 25 June 2008 :  13:34:21  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote

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<

© 1999-2010 MaD2ko0l

Edited by - MaD2ko0l on 25 June 2008 13:36:27
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 25 June 2008 :  13:36:16  Show Profile  Reply with Quote
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<
Go to Top of Page

KC
Junior Member

USA
152 Posts

Posted - 25 June 2008 :  14:30:42  Show Profile  Visit KC's Homepage  Reply with Quote
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
<

Owner of vales.com and Elite Computers.
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 25 June 2008 :  15:16:01  Show Profile  Reply with Quote
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.<

Edited by - Carefree on 26 June 2008 12:21:11
Go to Top of Page

KC
Junior Member

USA
152 Posts

Posted - 26 June 2008 :  11:34:43  Show Profile  Visit KC's Homepage  Reply with Quote
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)


<

Owner of vales.com and Elite Computers.
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 26 June 2008 :  16:58:59  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message  Reply with Quote
Thanks guys for this!
Mabe package it up and put it in the forum "Mods w/ Code" Works good!<

coaster crazy
Go to Top of Page

KC
Junior Member

USA
152 Posts

Posted - 13 April 2009 :  12:06:39  Show Profile  Visit KC's Homepage  Reply with Quote
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.

Owner of vales.com and Elite Computers.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07