[pmwiki-users] getting form variables
Patrick R. Michaud
pmichaud at pobox.com
Sun Mar 26 09:08:10 CST 2006
On Sat, Mar 25, 2006 at 06:48:03PM -0500, Stirling Westrup wrote:
> Tom Carchrae wrote:
> > Markup('getarg', 'fulltext',
> > '/\\(:getarg (.*?):\\)/',
> > mygetarg('$1'));
> > i did some debugging, and i notice that part of the problem is
> > the order of parsing the code. for example, it appears that $1
> > is passed to my function, instead of what $1 represents, eg
> > 'name'. so maybe this is my fault? i tried '$1' -> $1 but
> > that didnt work.
> > any tips/pointers appreciated.
The pattern is missing the /e, and the replacement has to be
a string (otherwise the function is called immediately when the
Markup() function is called, and not when the markup is used).
More information about the pmwiki-users