|
From: Tim G. <tg...@pr...> - 2010-11-01 14:21:21
|
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. |