[pmwiki-users] hide buttons unless logged in

Maria McKinley parody at u.washington.edu
Wed Oct 10 21:37:33 CDT 2007


On 10/9/07, Petko Yotov <5ko at free.fr> wrote:
> On Tuesday 09 October 2007, Maria McKinley wrote:
> > I think I must have been unclear. I want to put something in my
> > config.php so that site-wide the page-action buttons don't show up,
> > but there is a small, single button somewhere on the page that one can
> > press to login, and then everywhere you go the page-action buttons
> > show up.
>
> Hi. Here is what I use:
>
> In the page Site/PageActions (or MyGroup/PageActions) I have this:
>
>         (:if auth edit:)
>         * [[{*$FullName}?action=edit   | edit]]
>         * [[{*$FullName}?action=diff   | history]]
>         * [[{*$FullName}?action=upload | attach]]
>         * [[{*$FullName}?action=attr   | attributes ]]
>         (:else:)
>         * %item class=white% [[{*$FullName}?action=login | login ]]
>         (:if:)
>         * [[{*$BaseName} | view ]]
>         * [[{*$FullName}?action=print | print ]]
>
> (You may re-arrange the links in another order.)
>
> And, in my file /pub/css/local.css I have this line:
>
> #wikicmds li.admin a.wikilink { color: white; }
> #wikicmds li.admin a.wikilink:hover { color: #eeeeee; }
>
>
> This way, if a user has edit authorizations, he will see all the action-links;
> another visitor will see only the last two, "view" and "print". The
> link "login" is white and becomes light-gray if you pass your mouse cursor
> above it.
>
> Have fun,
> Petko
>
Thanks for the instructions everyone! I'm still learning how to
administer pmwiki, and appreciate the advice. I wasn't aware of the
Site.PageActions until now. Unfortunately, neither of the if ((:if
authid:) or (:if auth edit:)) statements suggested seem to have any
affect, as if the page isn't being read at all. Is it possible that
something is over-riding what is written there, maybe the skin?

thanks,
maria



More information about the pmwiki-users mailing list