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:
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:
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:
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
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.< |