[pmwiki-users] Re: Re: WikiCalendar date markup

John Rankin john.rankin at affinity.co.nz
Tue May 10 18:22:48 CDT 2005


On Wednesday, 11 May 2005 12:05 AM, chr at home.se wrote:
>On 10 May 2005, John Rankin wrote:
>
>> As to why I added yyyy-mm-dd -> long date, it's to support the wikiforms
>> script, which often inserts dates, that you want to see displayed in a
>> friendly manner.
>
>How can I disable this behaviour? It makes it impossible for me to have 
>the calendar activated in some places.

The culprit is the following code:

Markup('wdate','inline','/(\d\d\d\d)([-\.\/])?(\d\d)\2(\d\d)/e',
    "((IsDate('$1$3$4')) ? longdate('$1$3$4') : '$0')");


Either disable it completely:
Markup('wdate','');
in config.php before including wikilog.php should disable it completely
(if my memory serves me correctly)

Or make it more restrictive:
you could tighten the rule to translate only one date style, eg
Markup('wdate','inline','/(\d\d\d\d)(\/)(\d\d)\2(\d\d)/e',
    "((IsDate('$1$3$4')) ? longdate('$1$3$4') : '$0')");

in config.php before including wikilog.php will only translate 
dates of the form yyyy/mm/dd

If you decide the latter, we can make this configurable through a
variable setting.


>
>/Christian

-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list