SessionAuthForm

Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.


To create a new cookbook entry, fill in or remove the sections below.

Goal

To embed authentication seamlessly into the Wiki page design without fiddling with HTML, CSS etc.

Solution

Attach:sessionauthform.php.txt

Discussion

PmWiki provides a login form (sessionauth.php). But the output is simple HTML and without a certain effort not easily embeddable into your Wiki design.

See http://beeblebrox.net/System/Login for an example of SessionAuthForm.

Installation

To install SessionAuthForm, perform the following steps:

1. Place the Attach:sessionauthform.php.txt script in your local/ subdirectory, then add the following line to your local configuration:

    include_once('local/sessionauthform.php');

2. Set configuration variables in your local configuration if you want

$LoginPage
Defines the Wiki page to use as login form. This page must not exist! It is created the first time you run the SessionAuthForm script. Default value is Main.Login.
$AuthFormFmt
Defines the look of the authentication form. Default value is
    <p>&nbsp;</p>
    <p>&nbsp;</p>

    <b>Please enter author and password</b>

    <p>&nbsp;</p>

    <form name='authform' action='{$_SERVER['REQUEST_URI']}' method='post'>
      <dl>
        <dt>
          <label for='author' title='Enter your author name here'>Author:</label>
        </dt>
        <dd>
          <input tabindex='1' id='author' name='author' value='$author' />
        </dd>
        <dt>
          <label for='password' title='Enter your password here'>Password:</label>
        </dt>
        <dd>
          <input tabindex='2' type='password' id='password' name='authpw' value='' />
        </dd>
        <dd>
          <input tabindex='3' type='submit' value='OK' />
        </dd>
      </dl>
    </form>
    <p>&nbsp;</p>
    <p>&nbsp;</p>

See Also

  • PmWiki/PasswordsAdmin
  • AuthorFromPasswordPrompt
  • AuthorFromPasswordPromptSessions

History

2004-08-29 Initial release

Comments & Bugs

Please post bugs and comments.

  • It works fine. I have placed it with the help of some css (div-tag) and it looks very nice.

But: how can I use it with PmWiki 2 ? I'm not that kind of programer to customize it at all, but would like to use this way also for another site running with pmwiki2.

Contributors

pmwiki-2.3.32 -- Last modified by {{ZimPet}}?

from IP: 85.171.160.186 ip should be disabled by default for security reasons