Changing parameters in News Module

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
pmckeown
Forum Members
Forum Members
Posts: 13
Joined: Thu Jul 27, 2006 3:40 pm

Changing parameters in News Module

Post by pmckeown »

Hi, I need the News module to display the date in European Format i.e. dd,mm,yy

I read the help on news module but where do I add or change the date parameter
Thanks in advance - Pat
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Changing parameters in News Module

Post by tsw »

Extensions -> modules -> click on news row help link
(optional) dateformat="%b %d, %Y" - Format to display the article's post date with. This is based on the strftime function and can be used in your template with $entry->formatpostdate. It defaults to %x, which is the default date format for the server's locale.
cyberman

Re: Changing parameters in News Module

Post by cyberman »

Please try this as option

Code: Select all

dateformat="%d,%m,%y"
pmckeown
Forum Members
Forum Members
Posts: 13
Joined: Thu Jul 27, 2006 3:40 pm

Re: Changing parameters in News Module

Post by pmckeown »

Hi thanks for the suggestion. I posted a news item and its fine. The sample news item which came with the module threw me out because it was 7/31/06 - thanks again
Bobonov

Re: Changing parameters in News Module

Post by Bobonov »

But normaly the news module should use the locale you set in config file if I am not wrong.

I found another post that suggest to create a tag that call the setlocale() and place it just before the news module call.
http://forum.cmsmadesimple.org/index.ph ... 780.0.html
and it should solve the problem....

But if it works it seem to be a bug in the core module that doesn't set the locale.

Using the locale, beside the correct format, allow also to printout the appropriate string for the month and day of the week (i.e. for Italian Giugno rather than June).
does anybody solveded the problem? Is it just a metter of passing the correct locale in conf file?
I tried several format but none of them worked.
Post Reply

Return to “CMSMS Core”