Page 1 of 1

"Blogs made simple" - dateformat customizable

Posted: Sun Jul 13, 2008 3:46 pm
by Connie
Hi!

as the date is differently formatted in many languages, I miss the functionality to define the desired format in the language file of the "BMS Module"

in Blogs.module.php at line 512, it defines:

Code: Select all

$datetime=date("d/n-y",$unixtime);
why not using a language definition like that:

Code: Select all

$lang['dateformat'] = 'd.m.Y';
and use that in the code?

Code: Select all

$this->Lang("dateformat")
here?

It surely can pretty up the blog and I think a language configuration is always better than to edit the core files...  :-\

Re: "Blogs made simple" - dateformat customizable

Posted: Mon Jul 14, 2008 7:15 am
by cyberman
Connie wrote: I think a language configuration is always better than to edit the core files...  :-\
Second that :)

You can define date format in template with

Code: Select all

{$entry->time|date_format: ...}
http://www.smarty.net/manual/en/languag ... format.php

Re: "Blogs made simple" - dateformat customizable

Posted: Mon Jul 14, 2008 11:00 am
by Connie
Hi Cyberman,

danke! I will try to do that... a working solution would be better.... as not everybody is expert --

I see that in other modules as well the language file use is not supported completely,

why is "Blogs made simple" using case for defining which language and you must define the language with every use of the tags?

I thought that "BMS" is a core  module...
this also is in danger to be overwritten by updates...

I like CMSMS, but I have a lot of work to find out all these small details to get a satisfying website...  :-\

have a nice day!

Connie

Re: "Blogs made simple" - dateformat customizable

Posted: Mon Jul 14, 2008 11:37 am
by cyberman
Connie wrote: a working solution would be better
This is THE working solution for Blogs 8). Think it makes no sense to define such things in the language file.

To the first it's a language file and not a config file. And inside a language there are so many individual preferences (17.7.08, 17. Juli 2008 ...) so it would be difficult to insert the right one in language file. And why to use an additional parameter if Smarty makes it so easy?
.... as not everybody is expert --
That's the reason for our support forum :D.
I thought that "BMS" is a core  module...
No, it's currently not.
this also is in danger to be overwritten by updates...
Template wount be overwritten by module updates.
but I have a lot of work to find out all these small details to get a satisfying website...
The handling of CMS made simple is really simple but you need some knowledges. And you are invited to make the documentation better ...

Re: "Blogs made simple" - dateformat customizable

Posted: Fri Aug 15, 2008 3:06 am
by tomjaxon
Hi

I tried permutations following as based on the link you provided (http://www.smarty.net/manual/en/language.modifier.date.format.php) and got various smarty errors

Code: Select all

{$entry->time|date_format: "%A, %B %e, %Y"}
I believe there should at absolute minimum be a date format option in the 'settings' tab of Blogs Made Simple

Re: "Blogs made simple" - dateformat customizable

Posted: Sat Aug 16, 2008 2:49 pm
by cyberman
Have you added your wish as feature request in BLOG project  ;)?

Re: "Blogs made simple" - dateformat customizable

Posted: Sat Aug 16, 2008 5:54 pm
by Dr.CSS
Welcome back cyberman... :)

Re: "Blogs made simple" - dateformat customizable

Posted: Sun Aug 17, 2008 9:18 am
by cyberman
Hi mark,

Yes, I'm back -  had to take a "medical" cure ...

Re: "Blogs made simple" - dateformat customizable

Posted: Sun Aug 17, 2008 9:37 am
by Dr.CSS
Well I hope it was non medical cure...