[pmwiki-users] Fwd: any solution to get a full customizable login prompt ?

Hans hans.bracker at googlemail.com
Sun Aug 20 10:21:23 CDT 2006

On 20/08/06, The Editor <editor at fast.st> wrote:

> 2) Can someone explain exactly how Site.AuthForm works in terms of
> remembering the page it is supposed to go to and then going there
> after authentication?  Is it some variable I could use in my recipe/form to
> set the nextpage?

I can try and answer 2):
Site.AuthForm is set in variable $AuthPromptFmt (in scripts/forms.php):

SDV($AuthPromptFmt, array(&$PageStartFmt, 'page:$SiteGroup.AuthForm',
  "<script language='javascript' type='text/javascript'><!--
    try { document.authform.authid.focus(); }
    catch(e) { document.authform.authpw.focus(); } //--></script>",

$AuthPromptFmt can be custom defined to use a different page as
AuthForm, or indeed have the normal Headers and Footers removed by
replacing $PageStartfmt with $HTMLStartFmt, and $PageEndFmt with
$HTMLEndFmt, as Pm pointed out in this thread. The output is always
aimed at the current page, and achieved by the PmWikiAuth function at
the end with
which displays the current page ($pagename) using $AuthPrompFmt,
thereby bypassing the more normal $HandleBrowseFmt which HandleBrowse
function uses to display the page with the page text content, using

$HandleBrowseFmt uses the page content ($PageText), unless a redirect
is encoutered:
  SDV($HandleBrowseFmt,array(&$PageStartFmt, &$PageRedirectFmt,
       '$PageText', &$PageEndFmt));
whereas $AuthPromptFmt does not include the page content.

Both can be custom defined in config.php without hacking pmwiki.php.

So there is no next page set with AuthForm, it just gets used instead
of the normal page content, and once the user is authenticated, or the
password verified, the page displays as normal. And if action=edit was
called or someother action, the page displays in the appropiate way,
i.e. the edit window or whatever.

Hope this makes it clearer.


More information about the pmwiki-users mailing list