News module and Blank of the month module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
js2006

News module and Blank of the month module

Post by js2006 »

Hi there,

I'm a newbie here, just wondering, is it possible to change the date format from 24h to 12h in the news module and blank of the month module for the following: post date, start date, end date etc?

Thanks,
skypanther

Re: News module and Blank of the month module

Post by skypanther »

From the BOTM help page (in the admin panel, modules page):

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.

So, where you put {cms_module module='BlankOfTheMonth'} instead use {cms_module module='BlankOfTheMonth' dateformat='your_format_string'}

To figure out what to put for your_format_string, you'll need to check out the PHP reference for the strftime() function. See http://us.php.net/strftime

Since I mostly copied the code from the News module to create the BOTM module, I assume that same paramter works for News too. I don't recall adding it.

Tim
Locked

Return to “Modules/Add-Ons”