I've been playing around with the DeleteAction recipe (<a href="http://www.pmwiki.org/wiki/Cookbook/DeleteAction">http://www.pmwiki.org/wiki/Cookbook/DeleteAction</a>) 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.<br>
<br>A further suggested amendment prevents the javascripted link from appearing unless you are logged in - the javascript contains the line<br><a onClick="return confirmSubmit()" href='$PageUrl?action=delete' accesskey='ak_delete'>$DeleteText</a>
<br><br>And the config.php contains the lines<br>if ($LoginName == 'Logout')<br>{$DeleteText = 'Delete This Page';} else {$DeleteText = '';}<code><br></code><br>I couldn't actually get that config.php amendment to work as written, although it does work if I use<br>
if( isset($AuthId) ) {$DeleteText = 'Delete page';} else {$DeleteText = '';};<br><br>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<br>
(:if auth delete:) [[$DeleteText]] (:endif:)<br><br>Hopefully the above makes sense, I'm very much learning as I go!<br>Michael.<br><br>