Page 1 of 1

Blog and cms_date_format

Posted: Thu May 14, 2009 7:45 pm
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!

Re: Blog and cms_date_format

Posted: Fri May 15, 2009 2:32 am
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?

Re: Blog and cms_date_format

Posted: Thu May 21, 2009 8:32 pm
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.

Re: Blog and cms_date_format

Posted: Thu May 21, 2009 9:31 pm
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!

Re: Blog and cms_date_format

Posted: Thu May 21, 2009 10:38 pm
by Jeff
Off the top of my head try {$entrytime|cms_date_format}.

I will look into it more tonight.

Re: Blog and cms_date_format

Posted: Thu May 21, 2009 11:55 pm
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?

Re: Blog and cms_date_format

Posted: Fri May 22, 2009 12:03 am
by Jeff
Check {get_template_vars} and {$entry|print_r}

Re: Blog and cms_date_format

Posted: Fri May 22, 2009 12:59 am
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