Ian MacGregor writes:
I thought I would add the following line to the Site.NewPageTemplate:
%color=#595959% [-monthdayyear-]%%

and have the wiki convert that to:
%color=#595959% [-September 17, 2012-]%%

when I tried editing the page so I wouldn't have to add the current date. I tried some ROSPatterns but I got errors and couldn't figure it out on my own.

The following may work:

 if($pagename != 'Site.NewPageTemplate') # not if editing the template
   $ROEPatterns['/\\[-monthdayyear-\\]/'] = strftime('[-%B %e, %Y-]');

If you have $ROEPatterns, in the pre-filled new page you will see the date
in the text area before saving the page; with $ROSPatterns you will see
[-monthdayyear-] which will be converted to the date when you save the page.

Petko


_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to