Date presentation enhancement - Posted (855 Views)
Member Locked
jamesdavis
Posts: 26
26
This is a little MOD that has been extremely well received on my board. What it does is show * Today * instead of the date if the date is today. Members find that it makes it far easier to locate what has changed on the board.
A new function (chkdateT) is added to inc_func_common.asp as follows:

Code:
function chkDateT(fDate,separator,fTime)
if left(fDate,8) = left(DateToStr(strForumTimeAdjust),8) then
chkDateT = "<B>* Today *</B>"
if fTime then
chkDateT = chkDateT & separator & chkTime(fDate)
end if
else
chkDateT = chkDate(fDate,separator,fTime)
end if
end function
Then anywhere you wish to use it just change 'chkdate' to 'chkdateT'

You may see it in action here.<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Forum Admin
HuwR
Posts: 20611
20611
Today for you may not be today for other people though smile<
Posted
Member Locked
jamesdavis
Posts: 26
26
Because I use strForumTimeAdjust today is always today relative to all dates shown the user.<
Posted
Forum Admin
HuwR
Posts: 20611
20611
The forums today is still not my today unless it is in the same timezone as I am<
Posted
Member Locked
jamesdavis
Posts: 26
26
I understand that. This was a quick enhancement MOD. I will work on adding a local Time Adjust to the user profile to handle the real world.<
Posted
Forum Admin
HuwR
Posts: 20611
20611
Originally posted by jamesdavis
I understand that. This was a quick enhancement MOD. I will work on adding a local Time Adjust to the user profile to handle the real world.
Some people may not, that was the only reason for pointing it out, otherwise you can guarentee someone will complain smile<
Posted
Member Locked
jamesdavis
Posts: 26
26
The Local Time Zone function is now fully functional on my system. It took the addition of a small (6 character) field in the Members db and less than 50 lines of code. When I have shaken it down for awhile I will package it as a MOD.
Note that this only works for members - guests continue to see all times relative to the server's time zone.
You can register on my board and check it out for yourself by going to the Motorcyle Safety Forum.<
Posted
Starting Member
bitwise2000
Posts: 38
38
Originally posted by jamesdavis
The Local Time Zone function is now fully functional on my system. It took the addition of a small (6 character) field in the Members db and less than 50 lines of code. When I have shaken it down for awhile I will package it as a MOD.
That will be a great mod!<
Posted
Junior Member
Bassman
Posts: 256
256
Thanks Dave, this is a nice addon. Works great smile<
 
You Must enter a message