[pmwiki-users] login visible, not edit etc

Petko Yotov 5ko at 5ko.fr
Tue Mar 25 23:27:49 CDT 2008


Replying to James:

> On Tue, Mar 25, 2008 at 5:26 PM, James Montaldi <j.montaldi at gmail.com> 
wrote:
> > Hi all
> > I have seen on a couple of pmwiki sites that there is no edit/view/etc
> > menu, just a simple "login" link.  Presumably the other links appear
> > after logging in.
> > How is this implemented?

Hi James,

It is very easy to set. You need to open your wiki page Site.PageActions, 
like:
  http://example.com/pmwiki.php?n=Site.PageActions

and there, edit the page to have something like:

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


Note: there are some codes with %item% before the links which may be left.

Then save the page, and it will be like you asked: the page "actions" will 
appear only to logged in users (who can edit).

To learn more about Conditional expressions in PmWiki, see:
  http://www.pmwiki.org/wiki/PmWiki/ConditionalMarkup

Thanks,
Petko




More information about the pmwiki-users mailing list