[pmwiki-users] hide buttons unless logged in
Petko Yotov
5ko at free.fr
Tue Oct 9 17:10:41 CDT 2007
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
More information about the pmwiki-users
mailing list