This seems to be one area without consistent development.
I’m trying to add plugin support to FormProcessor, so that Javascript validation etc doesn’t have to be added into the core of the script. Not knowing how to write a plugin architecture, I have been looking for/at other PHP scripts that do this.
The prime example is “Smarty”:http://smarty.php.net but I haven’t figured out yet how to apply it to a non-compiling form, or a script that needs flexibility in the positioning of the output elements.
Other examples are the proverbial *Nuke scripts et al, but these seemed on closer inspection to be too different to help with FormProcessor - although I would like to understand how they work to do something similar in some of my projects.
Incidentally “sendcard”:http://www.sendcard.org was one of the first PHP scripts to have support for plugins - with a twist. When I wrote it I didn’t like the thought of checking a plugin array 20+ times during the script execution, so I wrote the plugin engine to insert the code directly into the main script files. It works well, but is a bit of a security risk, as the PHP files have to be group and/or world writable for it to work on most servers.
The more I look at adding plugins to FormProcessor the more I want to be able to parse the whole page into a DOM-tree and then add new nodes in places. That way I could stick Javascript in the and modify attributes for the
Otherwise it’s going to be very hard to get plugins to do much..
0 comments ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment