Not Solved Last Post: X Minute(s)/Hour(s) Ago
#11
Not Solved
(2009-01-01, 10:22 PM)okitai Wrote:
(2009-01-01, 06:25 PM)I Wrote: Is there a way to "pretty up" the time stamp? If the time is longer then 24 hours, I get something like "Yesterday 12:01". Is there a way to turn it to (for ex.) "Yesterday, at 12:01"?

Please reply. This is, somewhat, important.


Ori...

Yeah. This could be done. Open inc/functions.php
Find following:
if($todaysdate == $date)
		{
			$date = $lang->today;
		}
		else if($yesterdaysdate == $date)
		{
			$date = $lang->yesterday;
		}

Replace with following:
if($todaysdate == $date)
		{
			$date = $lang->today.", at ";
		}
		else if($yesterdaysdate == $date)
		{
			$date = $lang->yesterday.", at ";
		}

That's all.

Modification updated!
ProPortal: A More Functional Portal.
Click here for detailed information.
Reply
#12
Not Solved
Glad you updated it, bro - but don't forget; you need to tell them to also add:
$l['minutes'] = "Minutes";
$l['minute'] = "Minute";
... etc
Otherwise, from the looks of it - it'll look for $lang['minutes'] which doesn't exist.
Reply
#13
Not Solved
Don't worry, I checked it. These variables already exist in global.lang.php file Smile
ProPortal: A More Functional Portal.
Click here for detailed information.
Reply
#14
Not Solved
AlrightSmile My bad:p
Reply
#15
Not Solved
Lol. No problem Big Grin
ProPortal: A More Functional Portal.
Click here for detailed information.
Reply
#16
Not Solved
Glad someone finally did this:p I have a function a friend made that did this. One question though, does this only do it in minutes?
Reply
#17
Not Solved
Yes, this currently only shows minutes, but I can change it to show hours, days etc..
ProPortal: A More Functional Portal.
Click here for detailed information.
Reply
#18
Not Solved
I'd suggest doing so. And I'd also suggest adding:
<abbr title="ACTUAL DATE">x ago here</abbr>
Just a suggestion, though.
Reply
#19
Not Solved
Nice ideas. Wrote them down to my to-do listSmile
ProPortal: A More Functional Portal.
Click here for detailed information.
Reply
#20
Not Solved
Good to hearSmile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)