Customizing SMF > SMF Coding Discussion
Formatting the time on the right hand board index column
(1/1)
Tony Reid:
How do I format the time on the right hand boardindex column.
At the moment it says something like
--- Quote ---September 14, 2004, 08:16:59 PM
in Re: [FREE] General Help
by stevebor1
--- End quote ---
What I would really like to do is format it so it continues to display the date - but does so in short form(UK style) like...
--- Quote ---14/09/04, 08:16PM
in Re: [FREE] General Help
by stevebor1
--- End quote ---
So its format would be something like : d m y G:i:A
I have found the code in the boardindex template - but I have no idea how to change its output :(
--- Code: ---<td class="windowbg2" valign="middle" width="22%">
<span class="smalltext">
', $board['last_post']['time'], '<br />
', $txt['smf88'], ' ', $board['last_post']['link'], '<br />
', $txt[525], ' ', $board['last_post']['member']['link'], '
</span>
</td>
--- End code ---
I presume I could change the overall date formatĀ and it would change throughout - however I would prefer to keep the long date in use at the top of the forums index.
Any help appreciated :)
Tony,
Metho:
Admin => Edit Features and options => Basic Forum Features. Look for Default time format.
It would be %d/%e/%y, %I:%M %p I believe
- Methonis
Tony Reid:
But that changes it at the top of the board index and affects my coppermine date stamps(using bridge)
The only place I need it to cahnge is on the right hand boardindex column.
Thanks for trying though :)
[Unknown]:
--- Code: ---<td class="windowbg2" valign="middle" width="22%">
<span class="smalltext">
', strftime('%d/%e/%y, %I:%M %p', $board['last_post']['timestamp']), '<br />
', $txt['smf88'], ' ', $board['last_post']['link'], '<br />
', $txt[525], ' ', $board['last_post']['member']['link'], '
</span>
</td>
--- End code ---
-[Unknown]
Navigation
[0] Message Index
Go to full version