[pmwiki-users] Custom function markup?
Peter Bowers
pbowers at pobox.com
Sun Jan 30 22:26:53 CST 2011
On Sun, Jan 30, 2011 at 9:37 PM, Sonja Elen Kisa <sonja at kisa.ca> wrote:
> In config.php, I have:
> http://pastie.org/private/yz7hmio30ojvuiensfcq
>
> in buckwalter.php, I have:
> http://pastie.org/private/msol4uritlsu7be7bxkya
>
> I'm trying to set it up so I can type something like (@hlAl@) when
> editing a wiki page and it will magically convert it to Arabic.
>
> Can somebody please tell me what I'm doing wrong in config.php?
Here's your call to Markup():
Markup(
'Buckwalter',
'directives',
'/\\(@(\\.*?)@\\)/',
"buckwalter_to_arabic('$1')"
);
The line with the pattern needs to look like this (taking out 2 backslashes):
Markup(
'Buckwalter',
'directives',
'/\\(@(.*?)@\\)/',
"buckwalter_to_arabic('$1')"
);
I didn't look too carefully at the accompanying script to see if there
were problems there, but at least this should get you past your first
hurdle.
-Peter
More information about the pmwiki-users
mailing list