[pmwiki-users] date markup
Sameer Kumar
skumar at eharch.com
Thu Mar 6 14:02:36 CST 2008
On Thu, Mar 06, 2008 at 04:07:28PM +0100, Peter Bowers wrote:
> I have no idea if this will conflict with any other markups or
whatever
> out there, but this works:
>
> Markup('~~','>~~~','/(?<!~)~~(?!~)/',"$CurrentTime");
>
> This is modified very slightly from the ~~~ and ~~~~ markup
definitions in
> scripts/author.php
This will always display the current time, as opposed to the time
when the page is saved.
To get ~~ to generate a date stamp at the time the page is saved, try:
$ROSPatterns['/(?<!~)~~(?!~)/'] = $CurrentTime;
Pm
----------------------------------
This did not work!
Upon save, the '~~' simply get deleted and no date or time added.
However, the suggestion from Hans works. It is as follows:
$ROSPatterns['/(?<!~)~~(?!~)/e']
= "FmtPageName('\$CurrentTime', \$pagename)";
Markup('~~','<links','/(?<!~)~~(?!~)/',"$CurrentTime");
More information about the pmwiki-users
mailing list