[pmwiki-users] Problem using MarkupExpressions with ZAP variable

The Editor editor at fast.st
Sun Jun 17 07:55:55 CDT 2007


On 6/16/07, Benoit Dutilleul <benoit.dutilleul at googlemail.com> wrote:
> Hello,
>
> I'm still working on this system to manage events and struggling with the
> conversion of date and time into a timestamp. Now, I have a basic ZAP script
> working but it seems that the ftime markup does not work with ZAP variables.
>
> (:zapform key=AddEvent:)
> (:input text EventYear:)
> (:zap php_EventDate="strtotime|{EventYear}" AddEvent:)
> (:zap EventDate="{php_EventDate}" AddEvent:)
> (:zap savedata="EventDate" AddEvent:)
> (:input submit:)
> (:zapend:)
>
> {$:EventDate}
>
> {(ftime %Y when="{$:EventDate}")}
>
> Can somebody help?
> Kind regards,
>
> Benoit



I still don't like all the changes Pm made to the time function,
specifically to require the @ symbol, but that's how it works in
PmWiki.  I tested this on my system and it worked fine:

{(ftime %Y when="@{$:time}")}

(:time: 1234567890:)

Note: this is not really a ZAP variable. It's a standard PmWiki PTV.
ZAP may be have been used to save it, but it could have been saved by
any of several mechanisms, and once saved it is handled entirely by
PmWiki. Just a thought to keep in mind.

Cheers,
Dan



More information about the pmwiki-users mailing list