[pmwiki-users] Method to selectively include template markup based on auth level

Patrick R. Michaud pmichaud at pobox.com
Fri Sep 2 12:20:06 CDT 2005


On Fri, Sep 02, 2005 at 10:10:54AM -0700, H. Fox wrote:
> > Can anybody provide some more information that would
> > help me with this task?
> 
> Related question: How do I do the equivalent of
> 
>      (:if auth read:)
>      (:if auth edit:)
>      (:if auth attr:)
>      (:if auth admin:)
> 
> in skin.php?

$page = RetrieveAuthPage($pagename, 'read', false, READPAGE_CURRENT);
if ($page['=auth']['read']) /* visitor has read permission */
if ($page['=auth']['edit']) /* visitor has edit permission */
if ($page['=auth']['attr']) /* visitor has attr permission */
if ($page['=auth']['admin']) /* visitor has admin permission */

Pm




More information about the pmwiki-users mailing list