[pmwiki-users] Using PmWiki as an invisible wiki for a personal website

Petko Yotov 5ko at 5ko.fr
Tue Mar 3 01:01:31 CST 2009

On Tuesday 03 March 2009 07:28:36 Jo Vermeulen wrote:
> figured out how to allow only admins to edit pages, but I'm not sure how I
> can easily hide edit/view/history etc. actions. Is there any PHP variable
> that I can use in my template (I'm creating a custom skin) to hide the
> actions bar at the bottom of the page?

Hi. The actions at the bottom of the default skin cannot be hidden, but can be 
removed. The actions at the top right area, however, can be hidden.

These are just links in your own wiki page [[Site.PageActions]] where you have 
something like this:

* [[{*$FullName}|View]]
* [[{*$FullName}?action=edit|Edit]]
* [[{*$FullName}?action=upload|Attach]]

(there is more wiki code, but the essential is what I extracted above).

I want these links to be displayed only if the visitor has edit permissions, 
if not, to show a "Login" link :

(:if auth edit:)
* [[{*$FullName}|View]]
* [[{*$FullName}?action=edit|Edit]]
* [[{*$FullName}?action=upload|Attach]]
* [[{*$FullName}?action=logout|Logout]]
* [[{*$FullName}?action=login|Login]]

See http://www.pmwiki.org/wiki/PmWiki/ConditionalMarkup. If you build a custom 
skin, best is to start with one that exists, and modify it for your needs.

You can even hide the "Login" link like this :

* %admin rel=nofollow% [[{*$FullName}?action=login|Login]] %%

and in your skin.css file, set 
 .admin a { color: white; }
 .admin a:hover { color: gray; }

This way, the link is white and invisible on the white background, but if you 
move the mouse cursor over it, it shows in gray. And you, as the admin, know 
where this link is positioned. 

See also http://www.pmwiki.org/wiki/PmWiki/WikiStyles for the %class% markup.


More information about the pmwiki-users mailing list