TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 728
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 692
  • Total: 692

Timestamp article

Started by undercovers, September 23, 2010, 07:47:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

undercovers

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

IchBin

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.

undercovers

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

IchBin

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.

undercovers

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.

undercovers

Hi Ichbin,

Do you have found what i can change?

Thanx for your help

IchBin

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.

This website is proudly hosted on Crocweb Cloud Website Hosting.