Blog and cms_date_format

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
teuntjeb
New Member
New Member
Posts: 7
Joined: Thu May 14, 2009 6:55 pm

Blog and cms_date_format

Post by teuntjeb »

Hi all,

I have installed Blogs Made Simple 0.3.3.1 on CMSMS 1.5.4 and want to make use of the CMSMS standard date format (cms_date_format). I found this thread, but still I was not able to make it work:

http://forum.cmsmadesimple.org/index.php?topic=23745.0

Can somebody help? Thanks!
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: Blog and cms_date_format

Post by Jeff »

but still I was not able to make it work:
What problems are you having? are you getting errors? what is it displaying?
teuntjeb
New Member
New Member
Posts: 7
Joined: Thu May 14, 2009 6:55 pm

Re: Blog and cms_date_format

Post by teuntjeb »

In case of "Blogs template":

The date format is good, but it is in English. I would like to have it in Dutch.
- Default language of the frontend is set to Dutch
- Tag in page is: {cms_module module='Blogs' lang="nl_NL" numentries="3" detailpage="blog"}

In case of "Entry template":
{$entry->time} can not be used. It returns empty.
Tag in default template is: {$entrytime}.  I'm able to not make it work with cms_date_format. I'm not that familiar with smarty and php.
teuntjeb
New Member
New Member
Posts: 7
Joined: Thu May 14, 2009 6:55 pm

Re: Blog and cms_date_format

Post by teuntjeb »

I managed to change the language, by changing config.php: $config['locale'] = 'nld' (nl_NL for UNIX)

Still have the problem with {$entrytime}. It takes the date format of BlogMS' settings.

Please help! Thanks!
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: Blog and cms_date_format

Post by Jeff »

Off the top of my head try {$entrytime|cms_date_format}.

I will look into it more tonight.
teuntjeb
New Member
New Member
Posts: 7
Joined: Thu May 14, 2009 6:55 pm

Re: Blog and cms_date_format

Post by teuntjeb »

That works! Thanks!

New problem:
{$entrytime} shows "Today at 12.00"
{$entrytime|cms_date_format} shows "May 22, 2009"

{$entry->timeonly} does not work within "Entry template". Is there a timeonly tag?
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: Blog and cms_date_format

Post by Jeff »

Check {get_template_vars} and {$entry|print_r}
teuntjeb
New Member
New Member
Posts: 7
Joined: Thu May 14, 2009 6:55 pm

Re: Blog and cms_date_format

Post by teuntjeb »

Thanks for your help!!

I fixed the timeonly stamp, by adding the code:

Code: Select all

$this->smarty->assign('timeonly', $this->MakeTime($entry["createtime"]));
in action.showentry.php at line 80.

{$timeonly} can now be used in Entry template
Post Reply

Return to “Modules/Add-Ons”