tamouse mailing lists writes:
I like how a tiny question mark is displayed next to a link when the
page it's pointing to doesn't exist yet. I'd like to replicate when
the page exists, but only if the reader is authorized to edit the
page.
The HTML snippets are in the variables $LinkPageExistsFmt and
$LinkPageCreateFmt, but it is a little tricky to modify them depending on
the permissions of a visitor for the "link target" page. It may be possible
to change the link format based on the permissions to edit the "current"
page rather than the "link target" page. Something like this near the END of
config.php:
if(CondAuth($pagename, 'edit')) {$LinkPageExistsFmt = "your HTML here";}
At any rate, if a visitor doesn't have edit permissions and clicks on such
an ?action=edit link, will only see a login form.
Petko
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users