|
From: Dieter P. <di...@pl...> - 2010-11-01 14:33:06
|
On Mon, 1 Nov 2010 10:21:14 -0400 Tim Gray <tg...@pr...> wrote: > On Nov 01, 2010 at 03:11 PM +0100, Dieter Plaetinck wrote: > > Thanks, this is actually another plugin then the one I was looking > > for. > > Yeah I wrote this from scratch the other month. > > > Notice that both the description for cb_prepare as well as the big > > comment block on top of your file imply that they reset/ignore mtime > > first, and then update using the info from the metadata. This is > > not correct, from looking at the code it seems that the pubdate can > > override the mtime, but the mtime is not discarded if there is no > > pubdate. > > That is correct. If there is not pubdate/pubtime, then the file's > mtime is used. If I recall correctly, the if those variables aren't > set in the post file, $(pubtime), $(pubdate), $(displaytime), and > $(displaydate) are all populated by the file's mtime, so you can use > the same set of templates and mix files with hardcoded dates and > files with mtime encoded dates. > > I think cb_prepare's comment reflects that fact that during the > cb_sortlist loop (which occurs before), a file's pubtime is set > according to the mtime if #pubtime/#pubdate doesn't exist. So once > you get to cb_prepare, we DO ignore file's actual mtime - it's > already been taking into account. hmmm.. okay. anyway, just tried your plugin, and it seems to works nicely. What would be pretty cool, is if the pubdate is in the future, don't show the story. this would allow me to time precisely when i want to publish a story at some point in the future. Dieter |