On Friday, 17 August 2007 5:00 AM, [EMAIL PROTECTED] wrote:
> 3. Markup tag in rule script is not processed (Richard Haven)
>Message: 3
>Date: Wed, 15 Aug 2007 10:30:55 -0700
>From: "Richard Haven" <[EMAIL PROTECTED]>
>Subject: [pmwiki-users] Markup tag in rule script is not processed
>
>cookbook/my.php:
>
><?php if (!defined('PmWiki')) exit ();
>
>Markup('buy', '<img', "/\\(:buy (.*?)\\s*:\\)/e",
>"AddToCart('$1')");
>
>Markup('Buy', '<img', "/\\(:Buy (.*?)\\s*:\\)/e",
>"AddToCart('$1')");
I think the problem is the sequence; try changing '<img' to
'directives'. You probably also want "AddToCart(PSS('$1'))".
'img' is evaluated in the middle of evaluating links, and
you probably want to get the buy processing out of the
way and inside a Keep before PmWiki strikes something that
could be interpreted as a link.
>
>
>gives:
>
>(:Buy Basic Offer
><http://april.navio.com/wiki/index.php/Profiles/BasicOffer?action=edit>
>?
><http://april.navio.com/wiki/index.php/Profiles/BasicOffer?action=edit>
>:)
>
>Any suggestions for debugging ?
>
>Thanks
--
JR
--
John Rankin
\_
\)
\,\__/7
/ /
( c'
\ /
/, /_/
| & * Wellington
) /
/ /,
/ (
| /
\__/
V
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users