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  <12345 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 Posted: 15 April 2006 at 9:38am
Here is the Access compatible version ;


<%
'-------------------------------------------------------------------------------
'Visitors today MOD (Modded Again and Again) Access , 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 WHERE"
strSQL = strSQL & " day(DateAdd('h', " & AddTimeOffset &", tblAuthor.Last_visit)) = " & intDay & " and"
strSQL = strSQL & " month(DateAdd('h', " & AddTimeOffset &", tblAuthor.Last_visit)) = " & intMonth & " and"
strSQL = strSQL & " year(DateAdd('h', " & 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('h', " & AddTimeOffset &", tblAuthor.Last_visit) AS FFGG"
strSQL = strSQL & " FROM tblAuthor WHERE"
strSQL = strSQL & " day(DateAdd('h', " & AddTimeOffset &", tblAuthor.Last_visit)) = " & intDay & " and"
strSQL = strSQL & " month(DateAdd('h', " & AddTimeOffset &", tblAuthor.Last_visit)) = " & intMonth & " and"
strSQL = strSQL & " year(DateAdd('h', " & 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 same ...

Changes ;

- Access does not recognize "WITH (NOLOCK)" call [ removed from the mod ]
- Access does not recognize the DateAdd function like SQL [ changed to meet Access Requirements ]

Runs without problems now .

Please test and if you got errors do not hesitate to report :))


Edited by fatih.koz - 15 April 2006 at 9:39am
Back to Top
vassabi View Drop Down
Groupie
Groupie


Joined: 13 January 2006
Status: Offline
Points: 87
Post Options Post Options   Thanks (0) Thanks(0)   Quote vassabi Quote  Post ReplyReply Direct Link To This Post Posted: 15 April 2006 at 9:50am
Great job Fatih it works wonderful.

Thanks again.
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: 15 April 2006 at 9:52am
You are welcome Vassabi ... It was a pleasure for me

Best Wishes ,

Back to Top
bikrtrash View Drop Down
Groupie
Groupie


Joined: 05 January 2005
Location: United States
Status: Offline
Points: 67
Post Options Post Options   Thanks (0) Thanks(0)   Quote bikrtrash Quote  Post ReplyReply Direct Link To This Post Posted: 15 April 2006 at 5:34pm
I can't seem to get it to work....
Is there any way that you could post the modded default page for the access version???
 
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: 15 April 2006 at 6:55pm
Of course I can post the default.asp pages for Access and SQL in seperate zip files if it not harming the WebWiz License ...

I'm not sure of it .

Will ask Borg for it with a PM , if he accepts "your wish" I will post the zips here .

Regards,

Back to Top
Epperson View Drop Down
Newbie
Newbie


Joined: 08 November 2003
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote Epperson Quote  Post ReplyReply Direct Link To This Post Posted: 15 April 2006 at 7:28pm
Yeh, I am not very skilled at this stuff, would appreciate a screen shot of where to put the code.
 
Thanks
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: 15 April 2006 at 9:28pm
Sure ;

Here is the screenshots with simple insturctions ;

Pre Step 1 : Take A Backup Copy Of Your Default.asp file ! In case you will need an untouched copy .




Step 1 : Comment Out The CloseDatabase Function Call



Step 2 & 3 : Find Our Insertion Point and Prepare ;)





Step 4 & 5 : Paste The Code Here And Check The Installation





Save your file and upload it to the server (if you are not editing online)




Hope this helps ,

Best Wishes

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: 16 April 2006 at 12:10am
That is the clearest modding instructions i have ever seen Clap

I think all mods should have to come with instructions like that lol LOL
Handyman man?
Back to Top
 Post Reply Post Reply Page  <12345 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.