[pmwiki-users] ZAP member mgmt features...

The Editor editor at fast.st
Thu May 10 13:41:31 CDT 2007


Just a quick announcement that I've just updated the ZAP code for some
rather useful member mgmt features.

To automatically add a member to a (membership) group, use a command
like the following in a ZAP form:

(:zap group_ChessClub="+Bob":)
Use -Name to drop names, or define out right by inserting a CSV list.
For example, do a search of your member profiles for some string, and
output the pagelist to a csv list.  Instant groups!  You can also
automatically subscribe people to certain groups when they login based
on whatever criteria you wish.

I've also managed to fix the CSV list to take much more user abuse in
terms of unnecessary spaces, etc.

Membership information is stored on pages like Memberships.ChessClub
with pages that look simply like

Bob
Mike
Joe

To display the members of a group, you can do a {(grouplist ChessClub
'fmt')} using the same syntax (actually the same function) as the
existing list markup expression. So you can display many interesting
ways. Checks for read permission on the membership page or returns
null.

To conditionals have been added:

(:if group_exists ChessClub:)

and

(:if group_member ChessClub Caveman:)

When a person logs in using ZAP's authentication scheme, all existing
groups are checked and memberships are automatically added to the
session array for use in AuthUser conditions, etc. I should note, ZAP
can also set the passwords for specific groups/pages using the attr
command to make this even cooler!

Also reworked is the Login and Register function so that when a person
enters an invalid member name, it is automatically converted to a
proper page name fmt (using the MakePageName function), and sets their
authid appropriately. So if a person registers as test 123 they will
be assigned to Profiles.Test123, and have an authid Test123, but can
login as test 123 with no problem.  Works great!

Thanks esp to Ben for his inspiration on this last point, and to Pm
for his help with the group mgmt information. I'll be uploading the
new scripts shortly and trying to keep up with the documentation as
I'm able.

Please let me know if anyone notices any bugs or problems, or has
suggestions for improving things.

Cheers,
Dan



More information about the pmwiki-users mailing list