Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Who Visited Today Mod - ReWorked Working Edition
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Who Visited Today Mod - ReWorked Working Edition

 Post Reply Post Reply Page  123 6>
Author
fatih.koz View Drop Down
Newbie
Newbie
Avatar

Joined: 04 June 2004
Location: Turkey
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote fatih.koz Quote  Post ReplyReply Direct Link To This Post Topic: Who Visited Today Mod - ReWorked Working Edition
    Posted: 14 April 2006 at 3:27pm
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 Wink

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 Embarrassed


Edited by fatih.koz - 14 April 2006 at 3:41pm
Back to Top
Mikey View Drop Down
Senior Member
Senior Member

1979

Joined: 06 October 2003
Location: United Kingdom
Status: Offline
Points: 839
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikey Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2006 at 3:30pm
Only problem i'm having now is i thought the 'pop up profile' was redundant in version 8?

Your above code tries to include an old Javascript for creating the pop-up profile.

Apart from that it's great to have this back again woohoo Clap
Handyman man?
Back to Top
fatih.koz View Drop Down
Newbie
Newbie
Avatar

Joined: 04 June 2004
Location: Turkey
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote fatih.koz Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2006 at 3:34pm
Yes you are right :(

I forgot to change the Link Code , even I forgot to test it ... Sorry for that , will try to correct it now .

I think I'm confused of having a working mod and miss the links completely Tongue

Back to Top
Mikey View Drop Down
Senior Member
Senior Member

1979

Joined: 06 October 2003
Location: United Kingdom
Status: Offline
Points: 839
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikey Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2006 at 3:42pm
ha ha it's a great mod and it's only a minor problem which should be very easy to fix, i am very gratefull that you have updated and released this mod as it is one of my and my users favourite add ons Clap
Handyman man?
Back to Top
fatih.koz View Drop Down
Newbie
Newbie
Avatar

Joined: 04 June 2004
Location: Turkey
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote fatih.koz Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2006 at 3:43pm
Here is the quick solution ;


Response.Write "<a class=""smlink"" href=""member_profile.asp?PF=" & rsCommon("Author_ID") & """>"


First post edited with this update .

Hope this helps ,

Back to Top
Mikey View Drop Down
Senior Member
Senior Member

1979

Joined: 06 October 2003
Location: United Kingdom
Status: Offline
Points: 839
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikey Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2006 at 3:54pm
Spot on mate,
Nice one Thumbs Up
Handyman man?
Back to Top
JasonPEC View Drop Down
Newbie
Newbie


Joined: 02 March 2006
Location: United States
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote JasonPEC Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2006 at 4:30pm
Excellent job. Thanks!!!
Back to Top
k6irk View Drop Down
Newbie
Newbie


Joined: 26 September 2003
Location: United States
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote k6irk Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2006 at 10:50pm
Does this code work with the Access version as well or will someone be doing that mod?
 
Thanks
Back to Top
 Post Reply Post Reply Page  123 6>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.