This website can use cookies to improve the user experience

This website can use cookies to improve the user experience and to provide certain services and functions to users. Cookies contain small amounts of information (such as login information and user preferences) and will be stored on your device.

Enable All Cookies Privacy Policy

Removing time from news/articles and altering format


avatar
mishima 145
From: -
Removing time from news/articles and altering format

Hello,

How do I remove the time stamped on on news/articles please?

Also, I notice there is the option to alter US or EUR formatting for the date, how do I edit this formatting?

The EUR has dots seperating whilst the US has slashes!

Thanks for your help!

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


1 Re: Removing time from news/articles and altering format
avatar
Editor
0
From: -
You need to change the following templates for news:
news_story
news_story_extended

Add the following PHP part to the templates:
$insert['newsstory_date'] = date("Y-m-d", strtotime($insert['newsstory_date']));


You can adjust the formatting by changing the content of date("Y-m-d". See  PHP: date - Manual

The templates for articles are:
articles_overview_summary
articles_pages

The PHP part is slightly different:
$insert['article_date'] = date("Y-m-d", strtotime($insert['article_date']));

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.