[pmwiki-users] Getting results of a CGI onto a wiki page?

Jens Schiffler jens.schiffler at gmx.de
Fri May 12 12:21:34 CDT 2006

** Reply to message from "Felix E. Klee" <felix.klee at inka.de> on Thu, 11 May
2006 23:57:09 +0200

> I'm looking for a Wiki that allows me to create dynamic content.  In
> general, such content would be based on three components:
> 1. An (e.g. PHP-)function that is being passed some input parameters
>   and, after processing, sets some output parameters.  This function is
>   written e.g. by the wiki administrator.
> 2. A wiki page containing a form, among other content.
> 3. A wiki page used for showing the result.  Its source contains place
>   holders.
> Can pmwiki do this?  What other wikis are there which could be suited
> for this type of task?

I've written some code to plug in the smarty (http://smarty.php.net) template
engine. This allows for creation of dynamic pmwiki pages in a way that is
compatible with http://www.pmwiki.org/wiki/cookbook/JjsCMS

Here's how it works:

* the business logic of the form is defined by a php class. An instance of the
class is registered with the users session (using php session handling)

* The form and the result page are defined by the same wiki page, thus the
"action" attribute of the html-form element can be left blank

* a markup rule prevents smarty code from beeing altered by pmwiki

* my plugin hooks in pmwiki's "browse" action, captures the rendered page
content and uses it as smarty template that can make use of the sessions
business logic object 

Currently only one of my sites makes use of this feature. I don't have the time
to make this a recipe, but if you like I can give you the sources and a sample
wiki page.


More information about the pmwiki-users mailing list