The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
Does anyone have a copy of this mod anywhere? The links are dead, I installed it eons ago and now want to try and add it to the User Space mod.
Thanks in advance.<
Thanks in advance.<
Posted
Hi,
The .zip file for this MOD contains only a text file, and it is short. Instead of posting a link to the .zip, here are the contents of the readme.txt file.
Cheers,
Etymon
----------------------------------------------------------------------
Title: Today and Yesterday
Author: Kevin Whipp
Developed for use with Snitz Forums 2000 v3.4
Support: http://whipp.us/forum.asp?FORUM_ID=19
Description: Changes the display of today's date to "Today" and yesterday's date to "Yesterday".
INSTALLATION
============
1. Edit your own files according to the code and instructions below
*******************
INC_FUNC_COMMON.ASP
*******************
-------------------
FIND THIS FUNCTION:
-------------------
function chkDate(fDate,separator,fTime)
if fDate = "" or isNull(fDate) then
if fTime then
chkTime(fDate)
end if
exit function
end if
select case strDateType
case "dmy"
chkDate = Mid(fDate,7,2) & "/" & _
Mid(fDate,5,2) & "/" & _
Mid(fDate,1,4)
case "mdy"
chkDate = Mid(fDate,5,2) & "/" & _
Mid(fDate,7,2) & "/" & _
Mid(fDate,1,4)
case "ymd"
chkDate = Mid(fDate,1,4) & "/" & _
Mid(fDate,5,2) & "/" & _
Mid(fDate,7,2)
case "ydm"
chkDate =Mid(fDate,1,4) & "/" & _
Mid(fDate,7,2) & "/" & _
Mid(fDate,5,2)
case "dmmy"
chkDate = Mid(fDate,7,2) & " " & _
Monthname(Mid(fDate,5,2),1) & " " & _
Mid(fDate,1,4)
case "mmdy"
chkDate = Monthname(Mid(fDate,5,2),1) & " " & _
Mid(fDate,7,2) & " " & _
Mid(fDate,1,4)
case "ymmd"
chkDate = Mid(fDate,1,4) & " " & _
Monthname(Mid(fDate,5,2),1) & " " & _
Mid(fDate,7,2)
case "ydmm"
chkDate = Mid(fDate,1,4) & " " & _
Mid(fDate,7,2) & " " & _
Monthname(Mid(fDate,5,2),1)
case "dmmmy"
chkDate = Mid(fDate,7,2) & " " & _
Monthname(Mid(fDate,5,2),0) & " " & _
Mid(fDate,1,4)
case "mmmdy"
chkDate = Monthname(Mid(fDate,5,2),0) & " " & _
Mid(fDate,7,2) & " " & _
Mid(fDate,1,4)
case "ymmmd"
chkDate = Mid(fDate,1,4) & " " & _
Monthname(Mid(fDate,5,2),0) & " " & _
Mid(fDate,7,2)
case "ydmmm"
chkDate = Mid(fDate,1,4) & " " & _
Mid(fDate,7,2) & " " & _
Monthname(Mid(fDate,5,2),0)
case else
chkDate = Mid(fDate,5,2) & "/" & _
Mid(fDate,7,2) & "/" & _
Mid(fDate,1,4)
end select
if fTime then
chkDate = chkDate & separator & chkTime(fDate)
end if
end function
--------------------------------
REPLACE THAT WITH THIS FUNCTION:
--------------------------------
function chkDate(fDate,separator,fTime)
if fDate = "" or isNull(fDate) then
if fTime then
chkTime(fDate)
end if
exit function
end if
select case strDateType
case "dmy"
chkDate = Mid(fDate,7,2) & "/" & _
Mid(fDate,5,2) & "/" & _
Mid(fDate,1,4)
case "mdy"
chkDate = Mid(fDate,5,2) & "/" & _
Mid(fDate,7,2) & "/" & _
Mid(fDate,1,4)
case "ymd"
chkDate = Mid(fDate,1,4) & "/" & _
Mid(fDate,5,2) & "/" & _
Mid(fDate,7,2)
case "ydm"
chkDate =Mid(fDate,1,4) & "/" & _
Mid(fDate,7,2) & "/" & _
Mid(fDate,5,2)
case "dmmy"
chkDate = Mid(fDate,7,2) & " " & _
Monthname(Mid(fDate,5,2),1) & " " & _
Mid(fDate,1,4)
case "mmdy"
chkDate = Monthname(Mid(fDate,5,2),1) & " " & _
Mid(fDate,7,2) & " " & _
Mid(fDate,1,4)
case "ymmd"
chkDate = Mid(fDate,1,4) & " " & _
Monthname(Mid(fDate,5,2),1) & " " & _
Mid(fDate,7,2)
case "ydmm"
chkDate = Mid(fDate,1,4) & " " & _
Mid(fDate,7,2) & " " & _
Monthname(Mid(fDate,5,2),1)
case "dmmmy"
chkDate = Mid(fDate,7,2) & " " & _
Monthname(Mid(fDate,5,2),0) & " " & _
Mid(fDate,1,4)
case "mmmdy"
chkDate = Monthname(Mid(fDate,5,2),0) & " " & _
Mid(fDate,7,2) & " " & _
Mid(fDate,1,4)
case "ymmmd"
chkDate = Mid(fDate,1,4) & " " & _
Monthname(Mid(fDate,5,2),0) & " " & _
Mid(fDate,7,2)
case "ydmmm"
chkDate = Mid(fDate,1,4) & " " & _
Mid(fDate,7,2) & " " & _
Monthname(Mid(fDate,5,2),0)
case else
chkDate = Mid(fDate,5,2) & "/" & _
Mid(fDate,7,2) & "/" & _
Mid(fDate,1,4)
end select
select case Mid(Request.ServerVariables("SCRIPT_NAME"), InstrRev(Request.ServerVariables("SCRIPT_NAME"), "/")+1)
case "admin_accounts_pending.asp", _
"admin_config_datetime.asp"
'
' For any page that needs the actual date, add the file name to the above case statement. '
case else
select case left(fDate,8)
case left(DateToStr(date),8)
chkDate = "Today"
case left(DateToStr(date-1),8)
chkDate = "Yesterday"
end select
end select
if fTime then
chkDate = chkDate & separator & chkTime(fDate)
end if
end function
******************************************************************************
* Now upload the edited files to your forum directory on your website. *
* *
* I hope you enjoy this MOD. Please let me know if you have any questions, *
* comments or suggestions! *
* *
* - Kevin Whipp *
* - http://whipp.us *
******************************************************************************<
The .zip file for this MOD contains only a text file, and it is short. Instead of posting a link to the .zip, here are the contents of the readme.txt file.
Cheers,
Etymon
----------------------------------------------------------------------
Title: Today and Yesterday
Author: Kevin Whipp
Developed for use with Snitz Forums 2000 v3.4
Support: http://whipp.us/forum.asp?FORUM_ID=19
Description: Changes the display of today's date to "Today" and yesterday's date to "Yesterday".
INSTALLATION
============
1. Edit your own files according to the code and instructions below
*******************
INC_FUNC_COMMON.ASP
*******************
-------------------
FIND THIS FUNCTION:
-------------------
function chkDate(fDate,separator,fTime)
if fDate = "" or isNull(fDate) then
if fTime then
chkTime(fDate)
end if
exit function
end if
select case strDateType
case "dmy"
chkDate = Mid(fDate,7,2) & "/" & _
Mid(fDate,5,2) & "/" & _
Mid(fDate,1,4)
case "mdy"
chkDate = Mid(fDate,5,2) & "/" & _
Mid(fDate,7,2) & "/" & _
Mid(fDate,1,4)
case "ymd"
chkDate = Mid(fDate,1,4) & "/" & _
Mid(fDate,5,2) & "/" & _
Mid(fDate,7,2)
case "ydm"
chkDate =Mid(fDate,1,4) & "/" & _
Mid(fDate,7,2) & "/" & _
Mid(fDate,5,2)
case "dmmy"
chkDate = Mid(fDate,7,2) & " " & _
Monthname(Mid(fDate,5,2),1) & " " & _
Mid(fDate,1,4)
case "mmdy"
chkDate = Monthname(Mid(fDate,5,2),1) & " " & _
Mid(fDate,7,2) & " " & _
Mid(fDate,1,4)
case "ymmd"
chkDate = Mid(fDate,1,4) & " " & _
Monthname(Mid(fDate,5,2),1) & " " & _
Mid(fDate,7,2)
case "ydmm"
chkDate = Mid(fDate,1,4) & " " & _
Mid(fDate,7,2) & " " & _
Monthname(Mid(fDate,5,2),1)
case "dmmmy"
chkDate = Mid(fDate,7,2) & " " & _
Monthname(Mid(fDate,5,2),0) & " " & _
Mid(fDate,1,4)
case "mmmdy"
chkDate = Monthname(Mid(fDate,5,2),0) & " " & _
Mid(fDate,7,2) & " " & _
Mid(fDate,1,4)
case "ymmmd"
chkDate = Mid(fDate,1,4) & " " & _
Monthname(Mid(fDate,5,2),0) & " " & _
Mid(fDate,7,2)
case "ydmmm"
chkDate = Mid(fDate,1,4) & " " & _
Mid(fDate,7,2) & " " & _
Monthname(Mid(fDate,5,2),0)
case else
chkDate = Mid(fDate,5,2) & "/" & _
Mid(fDate,7,2) & "/" & _
Mid(fDate,1,4)
end select
if fTime then
chkDate = chkDate & separator & chkTime(fDate)
end if
end function
--------------------------------
REPLACE THAT WITH THIS FUNCTION:
--------------------------------
function chkDate(fDate,separator,fTime)
if fDate = "" or isNull(fDate) then
if fTime then
chkTime(fDate)
end if
exit function
end if
select case strDateType
case "dmy"
chkDate = Mid(fDate,7,2) & "/" & _
Mid(fDate,5,2) & "/" & _
Mid(fDate,1,4)
case "mdy"
chkDate = Mid(fDate,5,2) & "/" & _
Mid(fDate,7,2) & "/" & _
Mid(fDate,1,4)
case "ymd"
chkDate = Mid(fDate,1,4) & "/" & _
Mid(fDate,5,2) & "/" & _
Mid(fDate,7,2)
case "ydm"
chkDate =Mid(fDate,1,4) & "/" & _
Mid(fDate,7,2) & "/" & _
Mid(fDate,5,2)
case "dmmy"
chkDate = Mid(fDate,7,2) & " " & _
Monthname(Mid(fDate,5,2),1) & " " & _
Mid(fDate,1,4)
case "mmdy"
chkDate = Monthname(Mid(fDate,5,2),1) & " " & _
Mid(fDate,7,2) & " " & _
Mid(fDate,1,4)
case "ymmd"
chkDate = Mid(fDate,1,4) & " " & _
Monthname(Mid(fDate,5,2),1) & " " & _
Mid(fDate,7,2)
case "ydmm"
chkDate = Mid(fDate,1,4) & " " & _
Mid(fDate,7,2) & " " & _
Monthname(Mid(fDate,5,2),1)
case "dmmmy"
chkDate = Mid(fDate,7,2) & " " & _
Monthname(Mid(fDate,5,2),0) & " " & _
Mid(fDate,1,4)
case "mmmdy"
chkDate = Monthname(Mid(fDate,5,2),0) & " " & _
Mid(fDate,7,2) & " " & _
Mid(fDate,1,4)
case "ymmmd"
chkDate = Mid(fDate,1,4) & " " & _
Monthname(Mid(fDate,5,2),0) & " " & _
Mid(fDate,7,2)
case "ydmmm"
chkDate = Mid(fDate,1,4) & " " & _
Mid(fDate,7,2) & " " & _
Monthname(Mid(fDate,5,2),0)
case else
chkDate = Mid(fDate,5,2) & "/" & _
Mid(fDate,7,2) & "/" & _
Mid(fDate,1,4)
end select
select case Mid(Request.ServerVariables("SCRIPT_NAME"), InstrRev(Request.ServerVariables("SCRIPT_NAME"), "/")+1)
case "admin_accounts_pending.asp", _
"admin_config_datetime.asp"
'
' For any page that needs the actual date, add the file name to the above case statement. '
case else
select case left(fDate,8)
case left(DateToStr(date),8)
chkDate = "Today"
case left(DateToStr(date-1),8)
chkDate = "Yesterday"
end select
end select
if fTime then
chkDate = chkDate & separator & chkTime(fDate)
end if
end function
******************************************************************************
* Now upload the edited files to your forum directory on your website. *
* *
* I hope you enjoy this MOD. Please let me know if you have any questions, *
* comments or suggestions! *
* *
* - Kevin Whipp *
* - http://whipp.us *
******************************************************************************<
Posted
Posted
I dug this out of my archives. Replace "Today" with a hour time format. "5 hr. 37 min. ago"
Just replace
With
And as pointed out in the post that Shaggy linked to, it's important to use strForumTimeAdjust instead of the Date() function in kwipps mod
<
Just replace
Code:
chkDate = "Today"
Code:
nDif = DateDiff("n",strToDate(fDate),strForumTimeAdjust) mod 60 & " min. "
if DateDiff("n",strToDate(fDate),strForumTimeAdjust) > 60 then
hrDif = DateDiff("h",strToDate(fDate),strForumTimeAdjust) mod 24 & " hr. "
else
hrDif = ""
end if
chkDate = hrDif & nDif & "ago"<
_-/Cripto9t\-_
Posted
The others after midnight, some say Today and some say 2/18. Hmmm...
http://www.coincommunity.com/forum/
Never mind, had an errant paste problem.
Last edited by bobby131313 on 18 February 2008, 10:57
Posted
Almost, works with everything but the bookmarks now, we're close...
Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: "Yesterday 11:46:05 P"]'
/forum/user_space.asp, line 1313
Line 1313
if DateDiff("d",chkDate(eDate,"",true),strForumTimeAdjust) <= intIsNew then blnDate = true <
Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: "Yesterday 11:46:05 P"]'
/forum/user_space.asp, line 1313
Line 1313
if DateDiff("d",chkDate(eDate,"",true),strForumTimeAdjust) <= intIsNew then blnDate = true <
Last edited by bobby131313 on 18 February 2008, 11:05
Posted
is it possible to get it forward like;
if it's today, just say "2 hours ago" ?<
if it's today, just say "2 hours ago" ?<
Posted
what I mean is more like this one
http://www.tanguay.info/web/codeExample.php?id=543<
http://www.tanguay.info/web/codeExample.php?id=543<
Posted
Almost, works with everything but the bookmarks now, we're close...Function that includes line 1313...
Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: "Yesterday 11:46:05 P"]'
/forum/user_space.asp, line 1313
Line 1313
if DateDiff("d",chkDate(eDate,"",true),strForumTimeAdjust) <= intIsNew then blnDate = true
Code:
Function ChkIsRecent(eDate)
dim blnDate
blnDate = false
if DateDiff("d",chkDate(eDate,"",true),strForumTimeAdjust) <= intIsNew then blnDate = true
ChkIsRecent = blnDate
End Function
Last edited by bobby131313 on 18 February 2008, 17:05
Posted
Originally posted by bobby131313Bobby I posted this in the user space topic, you might have missed it. Use this instead
if DateDiff("d",chkDate(eDate,"",true),strForumTimeAdjust) <= intIsNew then blnDate = true
Code:
if DateDiff("d",StrToDate(eDate),strForumTimeAdjust) <= intIsNew then blnDate = true _-/Cripto9t\-_
Email Member
Message Member
Post Moderation
FileUpload
If you're having problems uploading, try choosing a smaller image.
Preview post
Send Topic
Loading...
