[pmwiki-users] PMWiki feature questions

Hans design5 at softflow.co.uk
Wed Aug 19 09:42:30 CDT 2009


Wednesday, August 19, 2009, 2:45:32 PM, Dan Bramall wrote:

> 1.
don't know.

> 2. Could there be three levels of users:
>         1. Administrators - can do everything on the site, including
> creating the other user types:
>         2. Editors - can edit/create page content but must be invited to do
> so by the client setting up individual log-ins for them
>         3. Users - can register on the site to edit/create content

PmWiki has no user registration/mamagement module.
The only recipe which allows users to self-register
I am aware of (and if you configure it so) is
http://www.pmwiki.org/wiki/Cookbook/HtpasswdForm

Is  'the client' the admin of the wiki, or do you have different
'clients' for different wiki groups, or what?

With AuthUser it is usually the admin who either adds users/passwords to
config.php, or to page  SiteAdmin.AuthUser.
Using HtpasswdForm users/passwords can be added via a form to file
.htpasswd, also usually done by the admin.
There is no mechanism to break this into client groups I am aware of
(i.e. no sub-admins)

> I've looked at the AuthUser documentation of PMWiki, but it seems to suggest
> that if you create a group, each user of that group just has the same
> log-in, so if one person needs to be blocked, you have to block the whole
> group and then send out different passwords etc - is that right?  That
> wouldn't be good, what we need is the ability for all users to have
> individual log-in details but to be able to assign them to a particular
> level.

No. If you include AuthUser you can assign username/password pairs,
i.e. give users an Id and a password individually,
then assign the Ids to usergroups as necessary.

> 3. Could the different levels of users have their content displayed in
> different colours?  E.g. Blue for administrators, red for editors and green
> for users?  If so, how?

In config.php add something like the following:

if (CondAuth($pagename, 'admin'))
    $HTMLStylesFmt['authbg'] = " #content {background:orange;} ";
elseif (CondAuth($pagename, 'auth'))
    $HTMLStylesFmt['authbg'] = " #content {background:pink;} ";
elseif (CondAuth($pagename, 'edit'))
    $HTMLStylesFmt['authbg'] = " #content {background:lightgreen;} ";

Replace '#content' with whatever div or table id works best for th
eskin you use (check the HTML source for ids).
#wikitext might work for the standard skin.

I left out the 'read' auth condition, as it is the standard.
The others will inject a style into th epage HTML head.
Use whatever css is suitable (I choosen 'background').


  ~Hans




More information about the pmwiki-users mailing list