Re: Adding ctime=0
Petko Yotov <[email protected]> Thu, 06 Feb 2025 08:25:47 +0100
| Newsgroups | gmane.comp.web.wiki.pmwiki.user |
|---|---|
| Message-ID | <[email protected]> |
The page key ctime is not set to $Now on existing pages, just on non-existing pages that are opened for creation. It is also not used by the core anywhere except when ordering a pagelist by ctime, and when it is unset, it works as zero. Editing existing pages does not add a ctime key and value. This means you have a custom function, recipe, or page variable, that does something with ctime, and it is setting it to $Now. What is your ctime customisation? We may be able to adapt it for your needs. Petko -- If you upgrade : https://www.pmwiki.org/Upgrades On 04/02/2025 12:10, Martin Cuno wrote: > Hello everyone, a small thing: > > I have almost 10,000 files in one of my PmWikis. Some of them are from > ancient sources, imported as flat files, and that's why the "ctime=" > information is missing here. > > Sometimes this bothers me, because I have info fields like: "This file > was created on ... and last modified on .... If ctime doesn't exist, > today's date is used. Maybe I could change that with an "if" > condition. But I would prefer to add that to the files, namely as > "ctime=0". Then it says "January 1, 1970" and everyone knows. I like > my files to be "in order". > > I'm not currently able to get this to work with external tools. So: > Since PmWiki writes information to the raw file format when saving > anyway, couldn't it add this information as well? > > If it's not of general interest (candidate for the core), I'm happy to > use a small code snippet. > > Thanks! Martin from Siegen, Germany