Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: WSA - kesäkuu 06, 2005, 04:22:21 IP

Otsikko: Removing the Time Stamp
Kirjoitti: WSA - kesäkuu 06, 2005, 04:22:21 IP
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.
Otsikko: Re: Removing the Time Stamp
Kirjoitti: [Unknown] - kesäkuu 07, 2005, 03:29:39 AP
That's in the "time format" for the forum.

-[Unknown]
Otsikko: Re: Removing the Time Stamp
Kirjoitti: WSA - kesäkuu 07, 2005, 10:07:44 AP
Correct, I tried that.

%B %d, %Y is what I have in that field now, but it still shows the time.
Otsikko: Re: Removing the Time Stamp
Kirjoitti: Ciced - joulukuu 13, 2005, 10:09:25 AP
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
Otsikko: Re: Removing the Time Stamp
Kirjoitti: Ciced - joulukuu 14, 2005, 06:48:55 AP
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 = '';