[pmwiki-users] Again: Parameterizing Content

Felix E. Klee felix.klee at inka.de
Thu May 18 15:32:51 CDT 2006


At Wed, 17 May 2006 17:03:45 -0500,
Chris Cox wrote:
> The PmCalendar, and other recipes parse data similar to this.  The
> monthly display I can assure you is all dynamically generated (and
> others styles as well of course). I simply take the parameters (if
> supplied) and use those to tailor the output... the page merely
> contains (:pmcal:) and that markup calls my php program which
> generates wiki content dynamically.  

It's nice to see that such complex applications are possible, though
PmCalendar seems to work quite differently to what I've in mind.

> Other cookbooks might generate HTML.. I took the approach of
> outputting pmwiki markup language for page renders.

I prefer pmwiki markup as well.

> At work I use a markup called (:shellOut cmd=programname
> parms=parameters:) which in turn execs a Unix/Linux shell script
> called programname at a protected path area which is assumed to output
> pmwiki markup language... that way I can quickly add and test new
> dynamic extensions (I'm a Unix/Linux dude of course).

Very cool, indeed.  AFAICS, your simple code could be the basis for an
extension allowing one to include dynamic content in the way that I
illustrated.

For the second solution that I illustrated in my original posting, the
markup could look something like this:

(: remoteout http://some.dom.ain/cgi-bin/some-script?foo=$inp_x&bar=$inp_y :)

Here "http://some.dom.ain/cgi-bin/some-script" is a CGI program that
outputs wiki code.  The expressions $inp_x and $inp_y are replaced by
the values of the corresponding GET parameters found in the URL of the
current wiki page.

For embedding CGI generated images into wiki pages, the following markup
could be used:

(: assemble http://some.dom.ain/cgi-bin/some-image-creator?foo=$inp_x&bar=$inp_y :)

"assemble" simply assembles a string using the GET parameters.  The
string is then interpreted by pmwiki.  In the above example, it's the
URL of a dynamically generated image.

Comments?

-- 
Felix E. Klee




More information about the pmwiki-users mailing list