[Pmwiki-users] How to use PHP applications within PmWiki

Steven Leite steven_leite
Thu May 13 01:34:16 CDT 2004


> I'm starting to learn PHP and want to include PHP applications within
my
> intranet PmWiki installation. Basically I want to keep the page layout
> and the sidebar, while running a specail application, like a small
> database or whatever.

If I understand correctly, you are basically looking to call a directive
like:

[[insert_my_application_here:]]

And have your application get put on the Wiki Page.  For this to happen,
your (PHP) application needs to return a string like this:

return $html;

That $html would then get put in the place of
[[insert_my_application_here:]].

But what you further want to do is, make more calls to that same
application, but without leaving the WikiPage you are on (?), and have
[[insert_my_application_here:]] be replaced with different contents each
time.

IF I understood everything correctly, then yes, you can do it using
<form> and <submit> ...

You can get your php application to scan $_POST variable for information
sent by the form, and then vary the output accordingly.

Example:  I did this with my x-chat plug-in.  The user is first asked to
input their name in a form.  After the user submits their name, the same
page is re-loaded, but only this time, the $_POST['nickname'] field is
set.  So instead of asking for the username again, the chat applet loads
with the appropriate data set.

Hope that helped.  If it did, and you want more info, feel free to email
me directly.

-S




More information about the pmwiki-users mailing list