| Author |
Topic Search Topic Options
|
fatih.koz
Newbie
Joined: 04 June 2004
Location: Turkey
Status: Offline
Points: 15
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
vassabi
Groupie
Joined: 13 January 2006
Status: Offline
Points: 87
|
Post Options
Thanks(0)
Quote Reply
Posted: 15 April 2006 at 9:50am |
Great job Fatih  it works wonderful.
Thanks again.
|
 |
fatih.koz
Newbie
Joined: 04 June 2004
Location: Turkey
Status: Offline
Points: 15
|
Post Options
Thanks(0)
Quote Reply
Posted: 15 April 2006 at 9:52am |
|
You are welcome Vassabi ... It was a pleasure for me
Best Wishes ,
|
 |
bikrtrash
Groupie
Joined: 05 January 2005
Location: United States
Status: Offline
Points: 67
|
Post Options
Thanks(0)
Quote Reply
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???
|
 |
fatih.koz
Newbie
Joined: 04 June 2004
Location: Turkey
Status: Offline
Points: 15
|
Post Options
Thanks(0)
Quote Reply
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,
|
 |
Epperson
Newbie
Joined: 08 November 2003
Status: Offline
Points: 26
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
fatih.koz
Newbie
Joined: 04 June 2004
Location: Turkey
Status: Offline
Points: 15
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
Mikey
Senior Member
1979
Joined: 06 October 2003
Location: United Kingdom
Status: Offline
Points: 839
|
Post Options
Thanks(0)
Quote Reply
Posted: 16 April 2006 at 12:10am |
That is the clearest modding instructions i have ever seen  I think all mods should have to come with instructions like that lol
|
|
Handyman man?
|
 |