[pmwiki-users] zap rewrite progress...

The Editor editor at fast.st
Tue Dec 12 21:57:27 CST 2006


Just thought I would mention to those of you waiting to take a look at
the upcoming version of zap, that I've made better than anticipated
progress on the overhaul of the engine to work as Ben and Pm
suggested, moving most of the zap commands into session variables
rather than form fields.  I've also made other changes--and it
actually seems to be working, though not thoroughly debugged or tested
yet.

Here's a list of the changes I've done or will be doing.  Let me know
if any have comments or questions on the changes outlined below.  I
will probably release it as a beta for awhile because it will break
some existing markups, and there will surely be a few bugs I missed.
Plus I will need time to update the documentation.

* Added a (:zap field=value:) markup which saves info to a keyed
session variable so it is invisible in html and more secure. This does
away with the awkward and arcane "lock pattern" that caused so much
confusion.
* Added an ignore command which tells zap to ignore certain fields
that might exist in the input form (in case they are needed for other
purposes, like a database).
* Rewrote the contorted zapform markup to allow an action
parameter--by default set to current page, but can be set to anything.
* Added a warn command which is like msg but stops form processing.
* Added a validate command which checks any given field for a regex pattern.
* Changed the if command from its old confusing syntax to one that is
hopefully more familiar, tying it into PmWiki's powerful conditional
system.  Should be much more flexible.
* Modules can now be automatically detected and utilized without
having to edit ZAP. I'm also going to add a heavily commented ZAPdemo
module others can use to design their own zap commands.
* Moved the login command out of ZAP to a ZAPlogin module for those
not using ZAP for their member management.  Also added a register
command to make it easier for admins to register new members.
* Added a rename command to ZAPfiles for renaming files.
* Added a ZAParchives module for several deprecated commands and markups.
* Created a new ZAPplus module to include several lesser used zap
commands, including listfmt and logs.  I also removed random, time,
totime, and count from ZAP, replacing the first 3 with markups in
ZAPplus, as these have proved easier to use.
* The new time markup allows you to display timestamps in any format,
and even add or subtract specified amounts of time.  Combining with
the checktime conditional gives you lots of options for scheduling
etc.
* Deprecated the required field as it was not very intuitive and its
features are more effectively done through combinations of validate,
if, and warn. Added a couple of its options into zapplus as
conditionals.

There are one or two things I still need to track down, but it's on
the downhill side I hope.  For awhile there I feared I was a bit lost
at sea, but it came out pretty clean. I would still like to touchup
the ZAPfixpage function, but don't really have any better ideas for
doing what it does right now.  Thanks for everyone's patience, as my
support of zap has been on hold a bit the last few days.

Cheers,
Dan




More information about the pmwiki-users mailing list