[pmwiki-devel] ZAP Math and Php

The Editor editor at fast.st
Fri Mar 9 17:41:53 CST 2007


Fantastic!  (Sorry about the exuberance...)

I was just about ready to post a big hairy email asking for help
debugging two new functions I'll be adding to ZAP (or a module).
ZAPmath and ZAPphp.  But I just discovered my mistake and have it
working after all!

ZAPmath allows you to enter an expression like "(2 + 3) * 5" and have
it automatically calculated. Allowed characters are admin
configurable--for the adventurous in heart.

ZAPphp allows you to define a list of accepted php commands and then
enter parameters into a form and execute them before processing the
info (yes--it will be escaped for security).  Any recommendations for
functions that should be available by default?  My starter list is
substr, strpos, date, time, but I'm open to input from the list...

Anyway, very powerful!  Hope to get the new ZAP up this weekend, or monday...

Cheers,
Dan

PS.  Both functions will be chainable in a form, and be able to work
together.  IE, use ZAPphp to define pi and then pull it into ZAPmath
to calculate the area of a circle with given radius.  Or whatever.



More information about the pmwiki-devel mailing list