[pmwiki-users] conditional stylesheets
Patrick R. Michaud
pmichaud at pobox.com
Thu Apr 21 20:47:49 CDT 2005
On Thu, Apr 21, 2005 at 09:36:44PM -0400, Bronwyn Boltwood wrote:
> I have a portfolio wiki where I'm the only author. In the skin I made
> for it, there's a stylesheet that hides authoring links, so that the
> world at large does not see them.
> How can I make PmWiki load the no-authoring stylesheet only when a
> visitor is NOT authorized to edit pages?
In 2.0.beta28 and later, the simplest is
if (!RetrieveAuthPage($pagename, 'edit', false, READPAGE_CURRENT))
'<link rel="stylesheet" href="$SkinDirUrl/css/no-authoring.css" />';
There might be some more efficient ways to do it, but this is
the first one that crosses my mind.
More information about the pmwiki-users