SOLVED: 'Dateformat' parameter dropped in News 2.9

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.
Locked
Uncle Pete
Forum Members
Forum Members
Posts: 18
Joined: Wed May 09, 2007 9:44 am

SOLVED: 'Dateformat' parameter dropped in News 2.9

Post by Uncle Pete »

Apologies to all if this has been dealt with elsewhere, but I couldn't find it! I've just done a long neglected upgrade from 1.31 to 1.5.

All has gone smoothly, apart from my news items balking a little with the error 'dateformat parameter not recognised' or somthing substantially similar. Sure enough, a quick look at the changelog says that the dateformat parameter has indeed been removed from the news module.

Now at the risk of sounding like a complete goober, what's the change that I need to make in my summary template to have the date posted with my news items like I had before? Gratitude and kudos to anyone who wants to throw a little help my way!
Last edited by Uncle Pete on Tue Dec 02, 2008 5:22 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: 'Dateformat' parameter dropped in News 2.9

Post by calguy1000 »

The dateformat parameter was removed because it was redundant, and not really necessary.

The cms_date_format smarty modiier will read the date preference in the global settings and use that to format dates.
So you can use something like this in your summary template:

Code: Select all

{$entry->postdate|cms_date_format}
This is also documented in the default templates.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Uncle Pete
Forum Members
Forum Members
Posts: 18
Joined: Wed May 09, 2007 9:44 am

Re: 'Dateformat' parameter dropped in News 2.9

Post by Uncle Pete »

Wow - that was fast!

I think the root of my problem might have been some kind of conditional 'if' code going on around my date element. With that cleared and the line you offered inserted I'm all good.

Thank you for taking the time to reply, and for being right!
Zack
Forum Members
Forum Members
Posts: 24
Joined: Fri Nov 16, 2007 2:31 pm

Re: SOLVED: 'Dateformat' parameter dropped in News 2.9

Post by Zack »

I had the same problem with the post date format and it is now solved when in changed templates as calguy suggested. But somehow the warning message from the page where the news is displayed won't go away. I cleared the cache but that didn't help. Any suggestion how to tackle this one? Thanks.
Daryn

Re: SOLVED: 'Dateformat' parameter dropped in News 2.9

Post by Daryn »

I was kind of disappointed to find out that this had been dropped from 2.9, but I understand the reasoning. The only problem I have is now I no longer know how to break out day, month and year separately into their own containers for styling. On my website I had them all styled separately into a block that floated to the top left of my actual news entry, but now I have to revamp it a little and put it all into one div or span.
Locked

Return to “CMSMS Core”