[pmwiki-users] Re: Re: Re: Supporting different modes in default pmwiki

Bronwyn Boltwood arndis at gmail.com
Mon Aug 8 15:01:32 CDT 2005

On 8/8/05, Neil Herber <nospam at eton.ca> wrote:
> At 2005-08-07  08:24 PM +0100, Hans is rumored to have said:
> >or using markup conditions like
> >(:if auth admin:)(:skin adminmode:)(:if:) or
> >(:if skin admin:)..special admin links..(:if:)
> In the markup above, (:if auth admin:) is checking to see if the user has
> been authorized with the admin password.
> The markup (:if skin admin:) (which I don't think exists, but is being used
> as an example) is trying to decide what skin to use based on the type of
> audience member (in this case, admin) is accessing the page - where the
> mechanism for declaring an individual a particular type of audience member
> is still being debated.

Your interpretation is correct.  Note that the code snippets is from a
mail where Hans was not clear on the difference between modes and

> >(:if auth admin:)(:skin adminmode:)(:if:) or

This *requires* the viewer to have already given the admin password,
and then changes the skin.  That's not the spirit of modes.  The
spirit of modes is to let Joe Random switch to the admin mode if he
likes, and if he tries to do something that is password-protected,
then he shall be asked for the password.

> >(:if skin admin:)..special admin links..(:if:)

This only shows the admin material if the skin is already set to the
admin skin.  This version is bad because it ties admin mode to a
specific skin.  Skins should support modes, rather than modes
supporting skins.
> So just to be pedantic, the audiences are: reader, author, admin (where the
> latter is an abbreviation); and the authorization states are: read, edit,
> upload, attr, admin

There's no final agreement yet on what the mode names should be (or
even what the entire concept should be named...), but those are the
roles being targeted.

I think there should also be a stealth mode, where the wiki pretends
that it's not a wiki, so as not to scare off your clients, or tempt
them into clicking edit links that they shan't be allowed to use. 
This is useful for sites -- such as portfolios or public-facing
business sites -- that use PmWiki as a CMS rather than a public
philosophy.  But there's a discreet login link, and once you login,
you're in a non-stealth mode, and PmWiki is ready for you to command.

You might like to take a look at Cookbook.ModesConcept.


More information about the pmwiki-users mailing list