News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Changing "Today" Interval

Started by ccbtimewiz, August 11, 2008, 11:47:51 AM

Previous topic - Next topic

ccbtimewiz

As we all know, SMF has a "Today" and "Yesterday" feature in the admin panel so we can see when posts were made more easily.

However, I'm trying to make it so it only says "today" when the post was after 4am. So if the post was made today at 2:21am, it would be listed as "yesterday" instead of "today".

Is there any simple solution to do this?

[SiNaN]

You should edit time_format in Subs.php file.

Maybe something like this can work:

$now[0] - $then[0] > 72000
Former SMF Core Developer | My Mods | SimplePortal

ccbtimewiz

Quote from: [SiNaN] on August 11, 2008, 12:16:57 PM
You should edit time_format in Subs.php file.

Maybe something like this can work:

$now[0] - $then[0] > 72000

Alright, I'll give that a go.

[SiNaN]

Also this could be an alternative:

if({original_today_statement} && $then['hour'] > 4)
echo today
and

if({original_yesterday_statement} || ({clone_of_original_today_statement} && $then['hour'] < 5))
echo yesterday
Former SMF Core Developer | My Mods | SimplePortal

Advertisement: