Date format change in entries and comments - solved

Dec 16, 2007 12:13

You must be rolling your eyes after reading the subject line, for so many people have asked this sort of question before, but bear with me, because I went through your replies and tried them, but failed miserably.

But first, the issue:
I'd like to change the "
15 December 2007 @" part in my entries and the "
Saturday 15 December 2007" part in the ( Read more... )

date format, solved

Leave a comment

Comments 5

snakeling December 16 2007, 12:55:51 UTC
To get the date in German, you need to edit your style and change the language to German.

Then, well, there's not much I can tell you apart from copy-paste the function post_entry in the FS source layer and modify it. How does it messes up your entry page?

(For the record and if you want to try again, the code to change in post_entry is %%dd%% %%month%% %%yyyy%%, to be changed to %%da%%, %%d%%. %%month%% %%yyyy%%.)

Reply

scolaro December 16 2007, 13:56:49 UTC
Thank you very much for your reply, snakeling! Initially I didn't want to change the style into German, but since this seems to change only the date anyway, I eventually followed your advice. Also, I must have messed up the code myself before, apparently I copied too much of it out of the source layer, (so it looked as if the first entry was the original posting and the next ones the comments of said entry).
Silly me... *rolls eyes*

(BTW: It was the "function print_entry" I copied, not "function post_entry" - there is no "function post_entry", as far as I could see.)

So now, thanks to you, the entry date now reads "Sa, 15. Dezember 2007, 15:35 Uhr". However, the comment date still reads "[name of friend] on 15. Dezember 2007 21:07 Uhr (local)". Is there a way to make this date look exactly as the entry date and delete the word "on", too?

Reply

snakeling December 16 2007, 16:59:37 UTC
It was the "function print_entry" I copied, not "function post_entry"
Yes, that's what happens when you do two things at the same time :P

For the comments, you need first to copy-paste function EntryPage::print_comment (Comment comment), again from the FS source layer (be careful to take everything, because it's long).

Then find this part of the code:


... )

Reply

scolaro December 16 2007, 18:16:03 UTC

Yes, that's what happens when you do two things at the same time :P

Sounds like me. :-D
Thanks a lot for taking the time to help me with the code! The changes worked like a charm and the date is displayed exactly as I wanted it.

I wish you merry Christmas and a very Happy New Year!!

... )

Reply


Leave a comment

Up