TinyPortal

Development => Support => Topic started by: undercovers on September 23, 2010, 07:47:19 AM

Title: Timestamp article
Post by: undercovers on September 23, 2010, 07:47:19 AM
Hi ik have TP 0,98

Were can i change the timestamp for an artikel.
I donÃ,´t want a hour only a date it give now: 23 september 2010, 10:12

And i want to change it to: Monday 10 september 2010

I know i can change the time format in feature & settings but than i change the time format of the forum too. And there i whant the normal time 23 september 2010, 10:12.

Can someone tel me how can i change te timestamp for tp articles only?

sorry for my englisch
Title: Re: Timestamp article
Post by: IchBin on September 23, 2010, 08:10:20 PM
Open Themes/default/TPSubs.template.php

Find this line:
<span class="article_date"> ' . (timeformat($context['TPortal']['article']['date'])) . '</span>';

Replace with this line:
<span class="article_date"> ' . (date('l d F Y', $context['TPortal']['article']['date'])) . '</span>';

FYI, you will lose this customization every time you upgrade.
Title: Re: Timestamp article
Post by: undercovers on September 24, 2010, 05:13:07 AM
Hi admin,  thans for your help, but i donÃ,´t have this file.

I have found in in TPortal.template.php
   echo '<span class="newsdate">' , $story['time'] , '</span>';

But i donÃ,´t know how i must change it.

I have do this too
' . (date('l d F Y', $story['time']. '

But i donÃ,´t work. It give the correct format, but al the dates are then Thursday 01 january 1970
Title: Re: Timestamp article
Post by: IchBin on September 24, 2010, 05:22:27 PM
Sorry, I missed the part where you were saying that you are using TP 0.9.8 so I posted for TP 1 RC1.  I don't have an install for TP 0.9.8 where I can test it on. But that is not the line you want to edit. I'm betting the line for the date is somewhere in the Sources/TPortal.php file in that version.
Title: Re: Timestamp article
Post by: undercovers on September 24, 2010, 07:22:54 PM
I donÃ,´t know were in Tportal.php i can change it, i see a lot of time and date tekst. The file is too big to paste in the forum. I have set it as attachments.
Title: Re: Timestamp article
Post by: undercovers on September 28, 2010, 07:44:34 PM
Hi Ichbin,

Do you have found what i can change?

Thanx for your help
Title: Re: Timestamp article
Post by: IchBin on September 29, 2010, 05:55:58 PM
I haven't had the time to do this for you. Have you tried any of the changes yourself? It wouldn't hurt for you to go through and change the timeformat sections to the way I showed you above. It's likely to depend on what you're frontpage settings are, to which places you need to edit. I would suggest editing each timeformat section to see if it changes what you need.