1
yellowchimp
date format in news module

The news articles appear with the date in the format year/month/day which is very confusing for me who is used to day/month/year. Does anyone know where I can go to change this?

2
hervet
Re: date format in news module
  • 2004/9/15 16:27

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Hello,

In the php files, find all the formatTimestamp() function's call. If the second parameter is not present, replace it with your date's format.

Note, you will be able to select the date's format in the next release.

Bye,
Hervé

3
yellowchimp
Re: date format in news module

thanks Hervet

Can you tell me which php files though - I'm having trouble finding the bits that you mean. Also can you be more specific about what code I should write/replace. I know no php!

4
hervet
Re: date format in news module
  • 2004/9/16 16:20

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


To find the scripts to modify, use your favorite program to find inside files.

5
tedsmith
Re: date format in news module
  • 2004/9/16 16:39

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


It is in language\english\global.php, lines 160 to 162. It looks similar to this (this is of course my own settings - see my site to see how it looks):

define("_DATESTRING","d/m/Y G:i:s");
define("_MEDIUMDATESTRING","d/m/Y G:i");
define("_SHORTDATESTRING","d/m/Y");

Read the lines that follow it (164 - 190) to choose what settings you want. Make a backup before changing anything though!!

I also had to make changes on my site and was surprised it was not an admin feature. Good to see it will be incorporated into the next release. Bravo

6
hervet
Re: date format in news module
  • 2004/9/16 17:00

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


That's a solution but it will modify the dates in ALL the modules of your website.

yellowchimp,
Give me some time and I will tell you what files to modify.

7
tedsmith
Re: date format in news module
  • 2004/9/16 17:19

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


Agreed, but I would assume that having a date format for one area would be required in all other areas anyway? Each to their own though. Its a good point.

8
yellowchimp
Re: date format in news module

Thats brilliant
Thank you so much - it works great!!!

9
Mithrandir
Re: date format in news module

Quote:

hervet wrote:
That's a solution but it will modify the dates in ALL the modules of your website.

yellowchimp,
Give me some time and I will tell you what files to modify.
I would think that this was actually intended - so you only have to modify ONE date format setting to get the same all over the site instead of configuring individual modules.

A module preference, selecting whether it should be the long, medium or short format used, would make a good solution, I think.

10
hervet
Re: date format in news module
  • 2004/9/17 15:26

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Quote:

Mithrandir wrote:
A module preference, selecting whether it should be the long, medium or short format used, would make a good solution, I think.

This will be the case for the 1.3 version

Login

Who's Online

228 user(s) are online (161 user(s) are browsing Support Forums)


Members: 0


Guests: 228


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits