Dates in 2k11

Creating and modifying plugins.
Post Reply
User avatar
Fabien
Regular
Posts: 172
Joined: Wed Mar 15, 2006 2:02 pm
Location: Paris (France)
Contact:

Dates in 2k11

Post by Fabien » Sat Oct 12, 2019 7:16 am

Hi,

It seems that 2k11 doesn't use the format of date defined in "lang/UTF-8/serendipity_lang_fr.inc.php". Where can I modify the format of date?

Thanks,
Fabien
Fabien Chabreuil (blog)

User avatar
onli
Regular
Posts: 2243
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Dates in 2k11

Post by onli » Sat Oct 12, 2019 10:18 am

Hi, there should be a configuration option in the theme configuration. In the backend area under Themes, below the active one.

User avatar
Fabien
Regular
Posts: 172
Joined: Wed Mar 15, 2006 2:02 pm
Location: Paris (France)
Contact:

Re: Dates in 2k11

Post by Fabien » Sat Oct 12, 2019 12:28 pm

Thanks for your answer.

Yes but it works for comments not for entries.
I use %A %e %B 0%Y
You can see on the mainpage of the blog : entries left and comments right : http://www.chabreuil.com/Aurore/
Fabien Chabreuil (blog)

User avatar
yellowled
Regular
Posts: 7056
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: Dates in 2k11

Post by yellowled » Sat Oct 12, 2019 2:13 pm

I'm a bit confused as to what is your issue here. The date format you want to use is supported by 2k11, so you should be able to select it in the theme options (don't forget to save, maybe clear template cache). However, that will only be used in places in 2k11's tpl file where the backend date format is used, not in the comments in the sidebar. To change those, you would need to change the date format used by the sidebar plugin (if that's possible).

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
Fabien
Regular
Posts: 172
Joined: Wed Mar 15, 2006 2:02 pm
Location: Paris (France)
Contact:

Re: Dates in 2k11

Post by Fabien » Sat Oct 12, 2019 4:50 pm

Thank you for your answer.

I used the date format listed in my previous message and of course, O havd cleared the cache. But the format is not applied to the entries.

I have set the same format in s9y lang file and sidebar plugin. Its probably the reason of the correct formating in comments and sidebar.

Best regards
Fabien
Fabien Chabreuil (blog)

User avatar
Fabien
Regular
Posts: 172
Joined: Wed Mar 15, 2006 2:02 pm
Location: Paris (France)
Contact:

Re: Dates in 2k11

Post by Fabien » Sat Oct 12, 2019 5:36 pm

Does the problem comes from the fact that I want to use a non standard format :
%A %e %B 0%Y

If yes, is there a bypass?
Fabien Chabreuil (blog)

User avatar
yellowled
Regular
Posts: 7056
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: Dates in 2k11

Post by yellowled » Sat Oct 12, 2019 7:04 pm

Fabien wrote:
Sat Oct 12, 2019 5:36 pm
Does the problem comes from the fact that I want to use a non standard format: %A %e %B 0%Y
Ah, so you have overridden DATE_FORMAT_ENTRY in your lang/serendipity_lang_fr.inc.php? If so, did you do that as well in lang/UTF-8/serendipity_lang_fr.inc.php?

If you changed it in both files, what is the first option you get in the date format dropdown in 2k11's theme options? Because that one should be whatever is your DATE_FORMAT_ENTRY. (I'm not sure if using the 0 is an issue, but since you can use i.e. a comma in the date string … does it work if you use 0 %Y instead of 0%Y?)

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
yellowled
Regular
Posts: 7056
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: Dates in 2k11

Post by yellowled » Sat Oct 12, 2019 7:15 pm

Erm, looking at your blog, the 0 doesn't even seem to be the problem because that is actually emitted in entries and in the sidebar … :?

Here's the thing: I don't understand French well. But as far as I can see, the format you want is

Full name of the weekday (le Mardi)
day of the month, no leading zero (24)
name of the month (février)
a „0“ followed by the four digit year (02003)

So the date format used in your entries by 2k11 is what you want (unless I misunderstand you completely, which is entirely possible). It is also used for comments in entries. It however, is not in the comments sidebar plugin (sam. 12 oct. 02019, 08:57 => %a %e %b 0%Y), which suggests that either you have not set it to the same format in the sidebar plugin or that the plugin is bugged.

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
Fabien
Regular
Posts: 172
Joined: Wed Mar 15, 2006 2:02 pm
Location: Paris (France)
Contact:

Re: Dates in 2k11

Post by Fabien » Sun Oct 13, 2019 7:29 am

Thank you for you information and advices. Everything is OK now.
Fabien Chabreuil (blog)

User avatar
Fabien
Regular
Posts: 172
Joined: Wed Mar 15, 2006 2:02 pm
Location: Paris (France)
Contact:

Re: Dates in 2k11

Post by Fabien » Sun Oct 13, 2019 8:45 am

Sorry, this post was not for this discussion : erased ***
Fabien Chabreuil (blog)

Post Reply