Today / Yesterday Mod... Anyone Have? - Posted (2087 Views)
Senior Member
bobby131313
Posts: 1163
1163
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.<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Senior Member
bobby131313
Posts: 1163
1163
No I didn't see that. blush However that fixes the bookmarks but breaks the drafts. sad
Microsoft VBScript runtime error '800a000d'

Type mismatch: 'strEditDate'

/forum/user_space.asp, line 658
middle line...
Code:
                                        if strUSDraftAutoDeleteSwitch = 1 and strUSDraftAutoDelete <> "" then
if DateDiff("d",strEditDate,strForumTimeAdjust) >= (strUSDraftAutoDelete - intDraftWarn) then
strTrimWarning = "<font color=""" & strHiLiteFontColor & """><acronym title=""This Draft will be deleted soon"">*</acronym></font>"
<
Posted
Senior Member
bobby131313
Posts: 1163
1163
Ha! Changed that line too and all seems swell so far!

Thanks!<
Posted
Average Member
cripto9t
Posts: 881
881
Originally posted by blackinwhite
is it possible to get it forward like;

if it's today, just say "2 hours ago" ?
The code I posted above does this. If you want something that goes farther back, I have some code that looks like it might do that. Its old and I've forgot if it works or not.<
    _-/Cripto9t\-_
Posted
Average Member
cripto9t
Posts: 881
881
I need to go through the code and change everything that compares dates, to use StrToDate()<
    _-/Cripto9t\-_
Posted
Support Moderator
Shaggy
Posts: 6780
6780
Originally posted by blackinwhite what I mean is more like this one

http://www.tanguay.info/web/codeExample.php?id=543
Might take a crack at a mod that does that soon, if I've the time.
<
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Posted
Average Member
blackinwhite
Posts: 657
657
Originally posted by blackinwhite what I mean is more like this one

http://www.tanguay.info/web/codeExample.php?id=543
Might take a crack at a mod that does that soon, if I've the time.

great news, thank you.<
Posted
Average Member
Andy Humm
Posts: 908
908
Great so far, but is there a small tweak that will alter the way the Statistics post with the 'last post 5hr. 33 min. ago 10:19:40 by: webmaster'
be changed to show 'last post 5hr. 33min. ago by: webmaster'
In other words when the date post is today it removed the time of post element.
But obviously any other posting time ie yesterday and previous dates the stats still shows post time. kindest regards andy<
Posted
Average Member
blackinwhite
Posts: 657
657
Originally posted by Andy Humm
Great so far, but is there a small tweak that will alter the way the Statistics post with the 'last post 5hr. 33 min. ago 10:19:40 by: webmaster'
be changed to show 'last post 5hr. 33min. ago by: webmaster'
In other words when the date post is today it removed the time of post element.
But obviously any other posting time ie yesterday and previous dates the stats still shows post time. kindest regards andy

I have changed chkTime function in inc_func_common.asp, try this;

Code:

function chkTime(fTime)
if fTime = "" or isNull(fTime) then
exit function
end If

If left(fTime,8) = left(DateToStr(strForumTimeAdjust),8) then

minutesTotal = datediff("n",strtodate(fTime),strForumTimeAdjust)
hoursTotal = int(minutesTotal / 60)
daysSince = int(hoursTotal / 24)
hoursSince = hoursTotal mod 24
minutesSince = minutestotal mod 60
' if daysSince = 1 then ChkTime = ChkTime & daysSince & " gün, "
' if daysSince > 1 then ChkTime = ChkTime & daysSince & " gün, "
if hoursSince = 1 then ChkTime = ChkTime & hoursSince & " hour, "
if hoursSince > 1 then ChkTime = ChkTime & hoursSince & " hours, "
ChkTime = ChkTime & minutesSince & " minutes ago."
else


if strTimeType = 12 then
if cLng(Mid(fTime, 9,2)) > 12 then
chkTime = ChkTime & " " & _
(cLng(Mid(fTime, 9,2)) -12) & ":" & _
Mid(fTime, 11,2) & ":" & _
Mid(fTime, 13,2) & " " & "PM"
elseif cLng(Mid(fTime, 9,2)) = 12 then
chkTime = ChkTime & " " & _
cLng(Mid(fTime, 9,2)) & ":" & _
Mid(fTime, 11,2) & ":" & _
Mid(fTime, 13,2) & " " & "PM"
elseif cLng(Mid(fTime, 9,2)) = 0 then
chkTime = ChkTime & " " & _
(cLng(Mid(fTime, 9,2)) +12) & ":" & _
Mid(fTime, 11,2) & ":" & _
Mid(fTime, 13,2) & " " & "AM"
else
chkTime = ChkTime & " " & _
Mid(fTime, 9,2) & ":" & _
Mid(fTime, 11,2) & ":" & _
Mid(fTime, 13,2) & " " & "AM"
end if

else
ChkTime = ChkTime & " " & _
Mid(fTime, 9,2) & ":" & _
Mid(fTime, 11,2) & ":" & _
Mid(fTime, 13,2)
end If



End if
<
Posted
Senior Member
bobby131313
Posts: 1163
1163
There's also 2 lines on topic.asp (search "edited by") that I changed to..
Code:
						"Edited by " & Reply_LastEditByName & " - " & chkDate(Reply_LastEdit, " " ,true) & "</font></td>" & vbNewLine & _

Makes better sense in all the scenarios. You don't get "Edited by Joe Blow on 43 minutes ago"
<
You Must enter a message