It's a work in progress, but so far I have created a set of functions that will generate a form based on a configuration file that has the following types of inputs:
- a text field
- a radio button with "yes, no, maybe" options
- a radio button with "yes, no" options
- a text field with a linked greater than, less than, equals drop down list
- a drop down list that is populated from a colum of a table
- a drop down list that is populated from a colum of a table with a linked greater than, less than equals drop down list
- a date picker with a linked greater than, less than, or equals, drop down list
So what's left to do is to finish the parser for each of these form pieces (most are done) and then plug that into the dynamic SQL generator. I know I am missing a whole layer for business logic in this but I don't need it yet for the application I'm building. It is a replacement for the the SlothMud III Equipment List that was previously built on core PHP and is linked to on the site. It has a tremendous breadth of features that all boil down to a generating the right query based on a set of checkboxes and a few text fields. It selects the appropriate data without really much further processing and then returns the results.
When I began approaching this problem, I wanted to just make the core scripts look like the rest of the site, but that really was going to leave a lot of functionality on the table, plus when I got into it, I really didn't like what I saw on how it was written (no disrespect to Enea intended).
The current difficulty with integrating this with Post Nuke is that though the 0.8 has a scripting language being built, it seems to be currenlty just an engine without a script library to leverage. I believe that once I have this working it could be relatively easy to wrap it into the format needed for use in the scripting engine and potentially become part of the core with some additional administration functions around table creation to support the scripts.
When I get the processor and dynamic SQL generator done, I'll post a link to the main page here.
No comments:
Post a Comment