Author |
Topic |
|
middleweb
Junior Member
USA
230 Posts |
|
cripto9t
Average Member
USA
881 Posts |
Posted - 08 August 2003 : 08:18:24
|
It seems like I have seen something like that on a snitz forum before. Not as elaborate as that, I have this in "sub write statistics" on default.asp
if (LastPostDate = "" or LastPostLink = "" or intPostCount = 0) then
Response.Write "."
else
Response.Write ", with the last post"
if DateDiff("d", chkDate(strLastPostDate,"",true), now) = 0 then
Response.Write " today <span class=""spnMessageText"">" & LastPostLink & LastPostDate & "</a></span>"
elseif DateDiff("d", chkDate(strLastPostDate,"",true), now) = 1 then
Response.Write " yesterday <span class=""spnMessageText"">" & LastPostLink & LastPostDate & "</a></span>"
else
Response.Write " " & DateDiff("d", chkDate(strLastPostDate,"",true), now) & " days ago on <span class=""spnMessageText"">" & LastPostLink & LastPostDate & "</a></span>"
end if
if LastPostAuthorLink <> "" then
Response.Write LastPostAuthorLink & "."
else
Response.Write "."
end if
end if
This just shows number of days since last poster posted. |
_-/Cripto9t\-_ |
|
|
cripto9t
Average Member
USA
881 Posts |
Posted - 08 August 2003 : 10:56:26
|
I tried this with the code above to try to get the seconds
DateDiff("s", chkDate(strLastPostDate,"",true), now) - (DateDiff("n", chkDate(strLastPostDate,"",true), now) * 60) & "sec." but it counts in the positive 1, 2, 3 etc. to 30 and then starts counting backwards in the negative -26, -25, -24 etc. to 0 then starts all over again. I guess the hrs and minutes do the same thing because at the time of this post this gives me a negative number
DateDiff("h", chkDate(strLastPostDate,"",true), now) - (DateDiff("d", chkDate(strLastPostDate,"",true), now) * 24) & "hrs."
2 questions
- Am I going about this right?
- Does anyone know why the above doesn't work
Thanks in advance |
_-/Cripto9t\-_ |
|
|
OneWayMule
Dev. Team Member & Support Moderator
Austria
4969 Posts |
Posted - 08 August 2003 : 17:04:15
|
I have created an include file to display a "Recently Seen" table some time ago. It has some options most of you won't need, but I'll post it anyway:
Features: Displays a table with recently seen members. Download: here
Installation Instructions:
Include the following line in a page:
<!--#INCLUDE FILE="inc_recentlyseen.asp" --> The inc_recentlyseen.asp file includes the following sub:
sub DisplayRecentlySeen(intNrOfPeople,intRecentlyStyle,strRecentlyMode)
intNrOfPeople .......... the number of members you want to display
intRecentlyStyle ... how the members are displayed
Allowed values: 0 - displays members in a row
1 - makes a break after each member
incRecentlyMode .... Defines how the time since last visit is displayed
Allowed values: "simple" - only "x days", "x hours" or "x minutes" is displayed
"extended" - "x days, y hours, x minutes" is displayed
Now call the sub wherever you want the table to be displayed like this:
Call DisplayRecentlySeen(5,1,"simple") (this is just an example)
If it sounds confusing, I've put up a demo page where you can see how it works and looks like: http://www.onewaymule.org/onewayscripts/forums/recentlyseen.asp
If you have any problems, let me know. |
My MODs: Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch
Useful stuff: Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
|
|
|
HolyOutlaw
Starting Member
USA
41 Posts |
Posted - 15 August 2003 : 14:47:14
|
OneWayMule, how would I prevent the current active users from showing up in the list? Would be nice for it to only show non active users only. Any help or ideas would be great, as I am still learning ASP.
Thanks in advance... |
Edited by - HolyOutlaw on 15 August 2003 14:47:34 |
|
|
OneWayMule
Dev. Team Member & Support Moderator
Austria
4969 Posts |
|
HolyOutlaw
Starting Member
USA
41 Posts |
Posted - 23 August 2003 : 22:00:00
|
Just touching base OneWayMule... |
|
|
OneWayMule
Dev. Team Member & Support Moderator
Austria
4969 Posts |
|
HolyOutlaw
Starting Member
USA
41 Posts |
Posted - 03 September 2003 : 12:27:37
|
bump... |
|
|
HolyOutlaw
Starting Member
USA
41 Posts |
Posted - 14 September 2003 : 00:03:02
|
Bump... |
|
|
HolyOutlaw
Starting Member
USA
41 Posts |
Posted - 16 October 2003 : 15:18:03
|
Hey OneWayMule,
Did you ever check this out? Thanks in advance.... |
|
|
weeweeslap
Senior Member
USA
1077 Posts |
Posted - 16 October 2003 : 15:21:55
|
I think OneWayMule is on a long vacation, he hasn't been responding on his website either for few weeks |
coaster crazy |
|
|
|
Topic |
|