Go
Decent Blogging using Foswiki Read on

1 SimonRaven replied 1 month, 2 weeks later

hi,

BTW, nice job on the plugin, i really like it. only problem i'm having with it however, is that it uses the file's ctime in displaying the post's time it was posted - a problem when the data (e.g., post, page, etc.) is older than that (importing it from blosxom, imported from wordpress).

how about adding an extra $META:FIELD called creationtime or posttime where the date and time the post was made is user settable, and the plugin fetches that to display it as the post's time of creation? you then still preserve the creation time, and you aren't dependent on a hard to edit system variable modifiable only by root and some *nix magic, but still allow people to have the post be listed in the right month in the archive ;). then you can have an extra field in the BlogEntry to set that date.

something like, in the BlogEntryXXXXX itself:

%META:FIELD{name="DateTime" attributes="M" title="DateTime" value="12223132"}%

(the value= being in epoch seconds)

and in the BlogEntry:

DateTime select 1 MonthJan, MonthFeb, etc. month posted M

and so on for the day, time, etc. … reply

7 Comments

1.1 SimonRaven replied 1 month, 2 weeks later

ergh, sorry, forgot something

wordpress has a similar function, you can change the timestamp of the post to whatever date/time you want, or leave it as-is. … reply

1.2 MichaelDaum replied 1 month, 2 weeks later

Ah, ok. I'll look into that. Hm, must tell the DBCacheContrib that it has to generate the createdate property of an topic using either date formfields if they are there or fallback to the timestamp of the first revision of a topic**, converting it to epoch seconds. Actually an early revision of the BlogPlugin had explicit datetime formfields.

(** Note, that file ctime is not used but the rcs time stamp of the first revision.) … reply

1.2.1 SimonRaven, 5 days, 3 hours later
> must tell the DBCacheContrib that it has to generate the createdate property of > an topic using either date formfields if they are there or fallback to the
> timestamp of the first revision of a topic

good idea.

> (** Note, that file ctime is not used but the rcs time stamp of the first revision.)

Oh, I see. So I technically could create the thing, change the timestamp in the RCS file (or on, depending) and have the posts show up at the time I edit / touch / whatever I set them to (?).

> Actually an early revision of the BlogPlugin had explicit datetime formfields.

That's a nice feature that's in WP, and blosxom has as a 3rd-party script. … reply

1.2.1.1 SimonRaven, 1 day, 3 hours later
Ahhh, that change to BlogPlugin is really nice. Took a few minutes to figure out what format the date took, but then i went "Doh! check the TestEntry0 for the format", and voila, it even takes seconds - very cool.

Thank you thank you thank you, you just made my week :). … reply

1.2.1.1.1 SimonRaven , 4 minutes later
Oh, oops, meant to say that maybe it should be documented - the date format I mean, here it is, just for that reason:

Date: 31 Feb 2003 - 00:01

(impossible date, but it makes it easy to search, and sticks out wink ) … reply

1.2.1.1.2 MichaelDaum , 26 minutes later
Oh, yea. Forgotten to mention the datetime format. But as soon as you create a new BlogEntry you will see it anyway as it is added automatically. Never mind. I could easily add more datetime formats snarfing them from the TimeSincePlugin.... … reply
1.2.1.1.2.1 SimonRaven , 16 minutes later
Whatever turns your crank :). Well, you'd probably get actual requests for it, so might as well be proactive about it I guess. Again, thanks a whole bunch :). … reply

Leave a Reply

You may have to login or register to comment if you haven't already.
r1 - 16 Nov 2005 - 15:30:16 - Main.SimonRaven
Copyright © 1999-2012 Michael Daum Consulting. All rights reserved. Impressum.