[Pmwiki-users] Create a Wiki page through a script

Thomas Weibel thomas
Wed Aug 25 22:46:07 CDT 2004


Hello!

May I introduce myself. My name is Thomas Weibel, I'm a student of CS and I'm
from Switzerland. I found PmWiki when I was looking for a simple CMS/blog
script. After trying several of those I was quite disappointed about their

inflexibility so I decided to try some Wiki engines and PmWiki was my
favourite.

I'm building a personal website with PmWiki. I've already customized it
according my needs and now I'm trying to improve the integration of the
sessionauth.php.

To do so, I use a normal Wiki page with an embedded form to login. This works
great if I create the page manually but I couldn't figure out how to write the
page through my script if it doesn't exist.

Here is the code I'm struggling with (the whole script is attached):

  if(PageExists("Main.Login")) {
    HandleBrowse("Main.Login");
  }
  else {
    HandlePost("Main.Login", "[[authform]]");
    HandleBrowse("Main.Login");
  }
  EndHTML();

As long as Main.Login exists, it works very good. How can I create Main.Login
or
any other page within a script?

Thank you very much,
Thomas


-------------- next part --------------
A non-text attachment was scrubbed...
Name: sessionauth.php
Type: application/x-httpd-php
Size: 2102 bytes
Desc: not available
Url : /pipermail/pmwiki-users_pmichaud.com/attachments/20040826/009b0c43/sessionauth.bin


More information about the pmwiki-users mailing list