wwtk is a wizard-style Web interface for structured information trails.
Version: 1.0wwtk is a wizard-style Web interface for structured information trails - an n-ary decision tree structure based on true/false logic.
Operating System: Linux
wwtk project can be used as a 'Wizard', an expert system, or as a backend for interactive fiction.
This toolkit is essentially based around the single script, index.php. It is designed to present data in a 'wizard-like' format, that is, as a set of linked nodes. These nodes are stored in the 'questions.xml' file, and can be added to and rearranged (it may seem initially confusing, but think of it as a linked list and all will hopefully become clear).
The glossary, by contrast, is stored in a simple text file (toolkit.txt/glossary.inc), and is simply read as a 'semi-colon separated variables' file.
To add to this, just add a line in the appropriate place as follows:
word; definition; url for further information
Any line that begins with a hash (#) is simply a comment and is ignored.
It is important that when adding to it, alphabetical order is preserved (or run the file through unix sort) - since this is not done when the values are displayed. If alphabetical order is broken in the file, the items will not appear in the expected order.
One further piece of information about the glossary; in the functionlib.php include file, you will find a richInclude and a printGlossary function. richInclude is used to include the html files (to be introduced shortly). It simply searches through the html file looking for keywords in the glossary, and when it finds them, it adds that glossary entry to the bottom of that article. printGlossary, on the other hand, simply prints every single entry in the glossary regardless of whether or not it is used; this is used for the print and report modes of this software.
You will notice that NO HTML CAN BE ADDED to the questions.xml file. This is because, to ensure compatibility with virtually any server (lack of specifications time here!) the XML is actually being parsed within the script, rather than using a more grown-up parser. Within these limitations, it was simpler to put long snippets of HTML in their own files. You will therefore find that some nodes have a value set in a < resultFile >< /resultFile > couplet - this file is included from the ./html subdirectory.
When you alter HTML, either within these files or within the header scripts, please note that the site is intended to validate as XHTML Strict!!
Certain text is stored within the toolkit_text directory - probably the easiest way to get to grips with the location of stored text is to make liberal use of grep -R * -e 'whatever'.
There are two CSS files. boldblue2.css is the original file; print.css is the print mode of the page. Both ought to validate successfully.