[pmwiki-users] Re: Method to selectively include template markup based on auth level
Patrick R. Michaud
pmichaud at pobox.com
Wed Nov 9 11:27:57 CST 2005
On Mon, Nov 07, 2005 at 01:33:29PM +0000, Anno wrote:
> > > 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 */
>
> I tried to use this in the config.php file, but it somehow doesn't seem to work.
> It works though if put in a shin.php file.
>
> How can I use this in config.php?
It should work fine in config.php, as long as $pagename has
been set properly.
Pm
More information about the pmwiki-users
mailing list