phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Formatting the time


 
Search this topic... | Search MOD Requests... | Search Box
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Author Message
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Thu Mar 11, 2010 10:38 am 
Post subject: Formatting the time

Hi,

I have added a code-snippet to my viewforum_body.tpl to show the startdate of a thread.
Code:
<span class="postdetails">{topicrow.FIRST_POST_TIME}</span><br /><span class="name">{topicrow.TOPIC_AUTHOR}</span>


FIRST_POST_TIME is defined like this:
Code:
    $first_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['topic_time'], $board_config['board_timezone']);

and
Code:
         'FIRST_POST_TIME' => $first_post_time,


Now, the date is show as
Ons Nov 19, 2008 7:42 pm
I would like to delete the time, it should only look like this:
Ons Nov 19, 2008
Can I do something to $first_post_time to solve this?

/Holger
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 449
Location: Québec


flag
PostPosted: Thu Mar 11, 2010 12:00 pm 
Post subject: Re: Formatting the time

As far as I have seen, create_date() uses the same format as the default date() function. Therefore, replace
Code:
create_date($board_config['default_dateformat'],

with
Code:
create_date("M j, Y",

; or
Code:
create_date("M d, Y",

if you want "Nov 01, 2010".

I have not tested this but that's how I see it should work.
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Thu Mar 11, 2010 1:50 pm 
Post subject: Re: Formatting the time

Works perfect! Thank you!
Back to top
Display posts from previous:   
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 4 Hours
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0494 seconds using 16 queries. (SQL 0.0203 Parse 0.0005 Other 0.0286)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo