[pmwiki-users] markup expression: what name & where?
Hans
design5 at softflow.co.uk
Mon Nov 12 16:16:44 CST 2007
Monday, November 12, 2007, 9:36:06 PM, Hans wrote:
>> So {(time onsubmit)} would give a different
>> value from {(time)}. Or, what might be easier on the php side of
>> things: {onsubmit(time)}, or {onsave(time)}.
> Not so different from {$$(time)} to {(time)}, just longer.
> I thought you like syntax short?
Sorry for being flippant. I think you are right there may be merit in
being able to specify even a "onsave" process. Rather than "onsubmit",
with what I am working at present. Generally I prefer to have
expressions evaluated at the beginning of the processing, so variables
can get their values early, which may influence the way the process
runs.
the one example were I appreciated a way to process after saving the
page was with email notify, and Pm cleverly uses
register_shutdown_function to call the notify function after the page
is (successfully) saved.
Has anyone an idea why this does not work?
$fx[$name] = preg_replace("/\\{\\$\\$(\\(\\w+\\b.*?\\))\\}/e",
"MarkupExpression(\$pagename, PSS('$1'))", $value);
With preg_match the pattern matches fine, but preg_replace does not go
anywhere.
~Hans
More information about the pmwiki-users
mailing list