date format of News module
-
- Forum Members
- Posts: 10
- Joined: Thu May 04, 2006 3:17 pm
date format of News module
hi,
I have been trying the dateformat parameter of the news module because I want the day/month/Year format.
The problem is that the dateformat parameter only changes the format of the summarytemplate, and not the detailtemplate.
I tryed to put this {strftime($entry->formatpostdate)} in the detailtemplate but is throwing an error.
Any suggestion?
thanks in advance
I have been trying the dateformat parameter of the news module because I want the day/month/Year format.
The problem is that the dateformat parameter only changes the format of the summarytemplate, and not the detailtemplate.
I tryed to put this {strftime($entry->formatpostdate)} in the detailtemplate but is throwing an error.
Any suggestion?
thanks in advance
- Elijah Lofgren
- Power Poster
- Posts: 811
- Joined: Mon Apr 24, 2006 1:01 am
- Location: Deatsville, AL
Re: date format of News module
This has been fixed in the SVN version of the News module.antuanjoseff wrote: hi,
I have been trying the dateformat parameter of the news module because I want the day/month/Year format.
The problem is that the dateformat parameter only changes the format of the summarytemplate, and not the detailtemplate.
I tryed to put this {strftime($entry->formatpostdate)} in the detailtemplate but is throwing an error.
Any suggestion?
thanks in advance
In News SVN in the Options Tab there is a now a "Format to display the article's post date with." blank and if you put something like this in the blank:
Then, in the News Detail template, you can use%A, %b %d, %Y
Code: Select all
{$entry->formatpostdate}
Thursday, Jun 29, 2006
The nightly SVN snapshot doesn't seem to be generated anymore on this page: http://dev.cmsmadesimple.org/scm/?group_id=8
You'll either have to check it out with TortoiseSVN or Subversion or wait for the next version of the News module to be released. It requires CMSMS 1.0-svn so if you want to use it you will need to upgrade CMSMS to 1.0-svn also.
I run the SVN version of most of my sites. I have SVN News and CMSMS running here: http://www.elijahlofgren.com/blog/
Hope this helps.
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding.
Re: date format of News module
Too complicated for nothing.
Why not use smarty modifiers ?
Why not use smarty modifiers ?
Code: Select all
{$entry->postdate|date_format:"%e %B, %Y"}
- Elijah Lofgren
- Power Poster
- Posts: 811
- Joined: Mon Apr 24, 2006 1:01 am
- Location: Deatsville, AL
Re: date format of News module
I hadn't thought of that. Good idea.mahjong wrote: Too complicated for nothing.
Why not use smarty modifiers ?Code: Select all
{$entry->postdate|date_format:"%e %B, %Y"}
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding.
Re: date format of News module
Thanks - Just what I have been looking for to, to change the date format on the news template.
Using this type of approach:
{$entry->postdate|date_format:"%e %B, %Y"}
Using this type of approach:
{$entry->postdate|date_format:"%e %B, %Y"}
Re: date format of News module
Does anyone know how to make a "setLocale" easily for the News module's date?
By default, the date is in english and i want to have it in french and italian or german...
By default, the date is in english and i want to have it in french and italian or german...
Re: date format of News module
1) Create a User Defined Tag with the following code inside .
2) Named it has you wish. For instance, SetToFrench.
3) Insert {SetToFrench} on to top of the page that needs it.
Code: Select all
setlocale(LC_TIME, 'french');
2) Named it has you wish. For instance, SetToFrench.
3) Insert {SetToFrench} on to top of the page that needs it.
Re: date format of News module
Hmmm thanx for the User Tag, I didn't think about it...mahjong wrote: 1) Create a User Defined Tag with the following code inside.Code: Select all
setlocale(LC_TIME, 'french');
2) Named it has you wish. For instance, SetToFrench.
3) Insert {SetToFrench} on to top of the page that needs it.
The thing that I've already tried to make a "setLocale(LC_TIME,'french');" on the top of my page in the template and it does not do anything on the news date
I call the news date with "$entry->formatdate".
Any idea why it does not work?
Re: date format of News module
You need to apply the patch I've created for the News module so it can process user tags. Developpers are very slow integrating this solution in the official release. They told me they are to busy to notice patch submissions.Any idea why it does not work?
If you are not familiar with SVN patches, take a look at this explicite description of the solution.
Last edited by mahjong on Tue Jul 18, 2006 12:52 pm, edited 1 time in total.
Re: date format of News module
did you use the {literal}your stuff {/literal} tags in the Source botton view to make your tag...