01356: time signature

Summary: time signature
Created: 2014-11-08 14:21
Status: Open
Category: Feature
From: nikos?

Description: Add a time signature.

Like in "author and time signature" ( ~~~~ ), but without the author.

It is common to post creation time in pages, like news articles.

It would be even better, if this "time signature" could be turned into a link.

Currently this...

    [[SomePage| ~~~~ ]] 

will result to this

   [[Profiles/nikos? November 08, 2014, at 02:37 PM]] 

Although the link is actually working, its name isn't printed right.

Specifically, I would like to combine the "time signature" with a link to the current page's differences history...


The syntax might look something like...

    [[{$FullName}?action=diff| ~~~~~~ ]] 

I see that the PITS system has a "time signature feature" (see above: " Created: ").
So this can already be done.
Then maybe a Cookbook recipy could be created. A "How to...".

nikos? November 08, 2014, at 02:37 PM

I define ~~~~~ in my configuration file to be a stylized author plus time signature. I imagine something like this would work for you, without needing to add a feature to PmWiki:

$page = PageVar($pagename, '$Name');

# add page variable {$Created} in $TimeFmt format that you define in config.php
$FmtPV['$Created'] = "strftime(\$GLOBALS['TimeFmt'], \$page['ctime'])";

    = "[[".$page."?action=diff|{".$page."\$Created}]] "; # 5 tildes = page history link

RandyB November 08, 2014, at 10:15 PM

Thank you very much!!!
The only problem I had was with testing this in Sandbox.
I thought I was doing something wrong, but it turns out that this works, properly, for pages that are created after it has been set in config.php . All's well then.

nikos? November 09, 2014, at 05:29 AM