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

Thomas Weibel thomas
Thu Aug 26 07:38:31 CDT 2004


> Try:
>
>    if (!PageExists('Main.Login')) {
>       $page['text'] = '[[authform]]';
>       WritePage('Main.Login',$page);
>    }

Thank you, this code works.

But now I have some kind of a chicken/egg problem: If editing is secured
through
a password, I need a login page which can only be written with editing rights.

This doesn't really matter for me, because the login page is generated quickly,
but to for another user who wants to deploy my script, it is easier to just
copy it into local/ and add it to config.php.

Is there a way to "surpass" the authentication system within a PHP script? E.g.
by writing directly into wiki.d/wikilib.d?

thomas




More information about the pmwiki-users mailing list