Uutiset:

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

Main Menu
Advertisement:

Removing the Time Stamp

Aloittaja WSA, kesäkuu 06, 2005, 04:22:21 IP

« edellinen - seuraava »

WSA

How do I remove the time stamp from the forum?

I want it to show the date but not the time it was posted.

So it would say today, yesterday, or the actual date but not the time anywhere.

[Unknown]

That's in the "time format" for the forum.

-[Unknown]

WSA

Correct, I tried that.

%B %d, %Y is what I have in that field now, but it still shows the time.

Ciced

#3
I would like to do the same thing as WSA here, did anybody figure out to remove the timestamp?

I took a look through Sources/Recent.php which seems to be where it's worked out but I'm not great at php so couldn't figure it out.

Hopefully somebody with more php knowledge can help us out.

//edit
I forgot to mention its for SMF 1.0.5

Ciced

Ahh it seems when you activate the Today/Yesterday it includes the time on the end over riding any default date format.

You can remove it by opening up Sources/Subs.php and search for:

// Try to make something of a time format string...

You can then edit the $today_fmt variable to edit the time format. In my case I wanted to entirely remove any time stamps so currently mine looks like:

// Try to make something of a time format string...
if (strpos($user_info['time_format'], '%H') === false && strpos($user_info['time_format'], '%T') === false)
$today_fmt = '';
else
$today_fmt = '';

Advertisement: