Here you go ,
Lastest working mod of the famous "Who Visited Today Mod"

BTW I think this is the first post on 8.x Version Mods , I hope futhers mods come in
For WWF 8 SQL Version
<% '------------------------------------------------------------------------------- 'Visitors today MOD (Modded Again and Again) SQL Db , WWF Ver 8 / By Fatih Koz '------------------------------------------------------------------------------- 'Declare Variables Dim MyCheck 'As Boolean Dim intDay,intMonth,intYear 'As Integer Dim dtmDate, dtmTempDate 'As datetime Dim AddTimeOffset 'as String like +7 or -8 - Holds The Time Difference Dim TotalVisit 'as Integer Holds The Total Visitor Count Dim strModTableHeading, strModTableNote strModTableHeading = "Members Visited Today" strModTableNote = "Member" 'Get Date dtmDate = Now() ' Build The Time Difference AddTimeOffset = strTimeOffset & intTimeOffset dtmTempDate = DateAdd("h", AddTimeOffset, dtmDate) 'Seprate the date into differnet strings intDay = CInt(Day(dtmTempDate)) intMonth = CInt(Month(dtmTempDate)) intYear = CInt(Year(dtmTempDate)) MyCheck = False 'First Of All Take The Count strSQL = "SELECT Count(tblAuthor.Username) as TotalVisitors " strSQL = strSQL & " FROM tblAuthor WITH (NOLOCK) WHERE" strSQL = strSQL & " day(DateAdd(hh, " & AddTimeOffset &", tblAuthor.Last_visit)) = " & intDay & " and" strSQL = strSQL & " month(DateAdd(hh, " & AddTimeOffset &", tblAuthor.Last_visit)) = " & intMonth & " and" strSQL = strSQL & " year(DateAdd(hh, " & AddTimeOffset &", tblAuthor.Last_visit)) = " & intYear strSQL = strSQL & " ;" ' Run The Code rsCommon.Open strSQL, adoCon TotalVisit = rsCommon("TotalVisitors") rsCommon.Close %> <tr class="tableSubLedger"> <td colspan="2"><%=strModTableHeading%> - (<%=TotalVisit%>)</td> </tr> <tr class="tableRow"> <td
width="4%" align="center"><img src="<% = strImagePath
%>active_users.gif" alt="Bugüne Ait Forum Ziyaretcileri" border="0"
/></td> <td width="96%"> <% 'Build Up The SQL For Member Names Selection strSQL = "SELECT tblAuthor.Username, tblAuthor.Author_ID, tblAuthor.Last_visit," strSQL = strSQL & " DateAdd(hh, " & AddTimeOffset &", tblAuthor.Last_visit) AS FFGG" strSQL = strSQL & " FROM tblAuthor WITH (NOLOCK) WHERE" strSQL = strSQL & " day(DateAdd(hh, " & AddTimeOffset &", tblAuthor.Last_visit)) = " & intDay & " and" strSQL = strSQL & " month(DateAdd(hh, " & AddTimeOffset &", tblAuthor.Last_visit)) = " & intMonth & " and" strSQL = strSQL & " year(DateAdd(hh, " & AddTimeOffset &", tblAuthor.Last_visit)) = " & intYear strSQL = strSQL & " ORDER BY tblAuthor.Username;" ' Run The Code rsCommon.Open strSQL, adoCon ' Write UserNames In Order With Profile Links Response.Write " " Do Until rsCommon.eof If MyCheck = True then Response.Write " , " Else MyCheck = True End If Response.Write "<a class=""smlink"" href=""member_profile.asp?PF=" & rsCommon("Author_ID") & """>" Response.Write rsCommon("Username") Response.Write "</a>" rsCommon.MoveNext Loop rsCommon.Close ' If You Wish You Can Delete The Table Heading Count And Use This Line Under or Over The UserNames Response.Write "<br><br>" & TotalVisit & " " & strModTableNote & " ...<br><br>" 'Clean up Call closeDatabase() %> </td> </tr> <% '------------------------------------------------------------------------------------------- 'End Visitors Today MOD ( Latest Mod By Fatih Koz - For Turkish Virtual Aviation Forum ) '------------------------------------------------------------------------------------------- %>
|
Installation is simple ;
Insert The Code To Your Default.asp just after the Online Members Display Area .
Change The Texts For Your Needs
Find the other
'Clean up
Call closeDatabase()
|
Section in your default.asp file and delete it , if you wish just add ' before them
If you miss this step you will get an error 'cause the DB connection will be closed .It will work .
You can both have the total amount in the table heading area and after the member names .
So choose one and delete the other section

I prefer havind it in the table heading section .
Here is a screenshot of what it look likes

Hope this helps you and ends the ongoing wait for this great mod .
Thanks for the authors worked on this from the start .
Note
: I'm not an SQL or ASP expert 'cause of this I can not build a colored
version of this ... If it can be done , it will be great

Note 2 : If needed please optimize this code for performance issues 'cause this is best I can do
Edited by fatih.koz - 14 April 2006 at 3:41pm