FormTemplateSystemII
<< Append Wiki Page | Cookbook-V1 | Random Quote >>
Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.
Goal
A flexible, extensible, parameter driven template system to support the use of form pages within PmWiki.
Solution
To achieve this goal the FormTemplateSystemII (FTS) uses two types of php scripts.
One of the scripts is the main module that oversees and manages the interaction between the "user", the template forms, and PmWiki. This module is activated by using an include_once
statement in the local.php file.
The other type of script contains specification for a form. This script is generated by the main module using parameters defined in a standard PmWiki page. The "instructions" in the PmWiki page are converted into a template script by applying ?action=prepform to the PmWiki page.
Files
Installation (requires PmWiki-0.6.0 through PmWiki-1.0)
- Download the above zip file and extract it to a working directory.
- Place the FTS-0.2.2.php file in your local.php directory.
- Copy the file SampleFormDesign to a group within wiki.d
- Define a form in a PmWiki page using FTS commands and format.
- Create the form template file using ?action=prepform
- Attach the form template to a particular PmWiki page or group.
Configuration
Add the following to your config.php script file.
include_once("local/FTS-0.2.2.php");
Usage
To activate a form template with a particular wiki page simply include the following at the end of the URL address: ?action=edit&template=templatename
. For example, assuming that the FTS were installed
http://www.pmichaud.com/wiki/group/WikiPage?action=edit&template=FTS-SampleTemplate
would open an existing or a new page with the associated form attached to group/WikiPage.
Example
A working example of the use of the Form Template System is available at the following URL: Sample Design Page.
See Also
Description of FormTemplateSystem the original version. Working Knowledge Base/Tabulation system for FTS <#> - JavaJunky
History
July 15, 2004 -- minor bug fixes -- version 0.2.2 March 1, 2004 -- minor bug fixes -- version 0.2.1 February 29, 2004 -- Initial release -- version 0.2.0
Documentation
Comments, Bugs
- Documentation
- Integration of CSS
- [Bug?] Hi, wasn't sure where to put this, but after installing the latest version of FTS my front page 'hangs' eventually leading to a timeout. Specific pages within the wiki load fine but the default page loaded by pmwiki.php causes the website to lockup :( Any ideas? -javajunky
Download and install version 0.2.2. If the problem remains, please repost a bug notice here. JFI downloaded and use the new version (0.2.2) and experiencing the same behavior as javajunky. I am using pmWiki version 0.6.7 if I'm not mistaken - maybe that has something to do with the problem? Thanks, Roy.
Contributors
- John Feezell, concept design and programming.
Copyright
Copyright 2003-2004 John Feezell, All Rights Reserved.
Copyright release is hereby given to PmWiki site administrators to include these scripts in support of normal site operations. Modifications that conform to current copyright law can be made to the scripts for personal use.
pmwiki-2.3.38 -- Last modified by {{tl}}?