[Pmwiki-users] show/hide menu items
Knut Alboldt
pmwiki
Tue Nov 2 13:09:52 CST 2004
At 22:48 01.11.2004, you wrote:
>Anybody been successful in hiding menu options from a users depending on
>if they're logged in with the "edit" or "admin" password?
No, I just have an solution when using the .htaccess-login. First I set the
$Author-var (else-part will be processed):
# if possible: get the author from php authentification or server
authentification
if (@$_SERVER['PHP_AUTH_USER']) {$Author =
strtoupper($_SERVER['PHP_AUTH_USER']);}
elseif (@$_SERVER['REMOTE_USER']) {$Author =
strtoupper($_SERVER['REMOTE_USER']);}
Then I set up the IF-condition:
# (:if author authorname:) this is only displayed for author with the name
authorname (:ifend:)
$Conditions['author'] = '$GLOBALS["Author"]==$condparm';
Hasn't Pm posted something concerning this ? I can't find it right now, but
I can remeber there was an restriction when using basic authentification.
Knut
More information about the pmwiki-users
mailing list