[pmwiki-users] Math/Php markup... ZAPbeta 2007-03 tweaks...

The Editor editor at fast.st
Sat Mar 17 23:26:10 CDT 2007


Just uploaded a new version of ZAP, ZAPextend and ZAPmarkups.  I've
been doing quite a bit of heavy testing and found a few small bugs and
repaired them.

Also came up with an idea for making ZAPmarkups tap into some of the
command functions in ZAP.  Could do with any command I suppose, but
only made sense for math and php.  So now you can do something like
this:

{#c math|(2+3) *5 /2.5} and have it output 10.  In terms of processing
order it is before conditionals but after page and text variables
(like all the other zap vars), so you can insert page variables in
this and then trigger a condition based on the calculated amount.

Also, you can do certain limited php commands:

{#c substr|How are you today, 5,3} and get something like "you" back.
The default php commands allowed for this (also available to zap
forms) are

              substr,strpos,strtotime,strftime,time,date,crypt

But it's configurable so you could set it to work for any php command
you want by simply resetting the value.

I also combined the date ZAPmarkup {#d} with the time markup {#t}. So
now the time markup works for both.

On another note, I fixed a small bug on Hg that kept its $sidemenu
feature from working properly. It's quite handy.

Cheers,
Dan

PS.  The ZAPmath and ZAPphp markups could be spun off as a separate
recipe if there is any interest.



More information about the pmwiki-users mailing list