[pmwiki-users] authorisation group variables in the config.php

Michael Fake michael.j.fake at googlemail.com
Sat Apr 4 09:19:46 CDT 2009

I've been playing around with the DeleteAction recipe (
http://www.pmwiki.org/wiki/Cookbook/DeleteAction) and it's working really
well. I've set it so that only high-privilege accounts can delete, and I've
also been using the suggestion on that page to use a javascript that
requires you to click a confirmation button before deleting the page.

A further suggested amendment prevents the javascripted link from appearing
unless you are logged in - the javascript contains the line
<a onClick="return confirmSubmit()" href='$PageUrl?action=delete'

And the config.php contains the lines
if ($LoginName == 'Logout')
{$DeleteText = 'Delete This Page';} else {$DeleteText = '';}

I couldn't actually get that config.php amendment to work as written,
although it does work if I use
if( isset($AuthId) ) {$DeleteText = 'Delete page';} else {$DeleteText =

However what I'd *really* like to do is to stop the javascripted link from
appearing unless you are logged in *as a specific authorisation group*. So
my question is: does anyone know of a variable I can use in the config.php
to limit by auth group in this way? Or alternatively, is there a way of
calling the $DeleteText variable from within the wiki page (say as an (:if:)
statement in Site.PageActions, like
(:if auth delete:) [[$DeleteText]] (:endif:)

Hopefully the above makes sense, I'm very much learning as I go!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20090404/ef0f5aa6/attachment.html 

More information about the pmwiki-users mailing list