On Monday, December 29, 2003, at 12:38 PM, Christoph Seiler wrote:
I would like to add a new CGI program for Mailman, because the existing scripts do not fit my needs. Unfortunately I'm not too familiar with Mailman and this seems to be a bit complicated. So I would appreciate any help.


I recently needed to add a 'list all members' function for our list admins; I elected to modify the python scripts in the Mailman directory:


1. In Mailman/Gui/Membership.py:
I added:
        ('listall', _('List All')),
to the function GetConfigSubCategories(self, category)

This had the effect of adding a new option to the 'Membership Management' section of Mailman, called 'List All' with an internal code of 'listall'.

2. In Mailman/Cgi/admin.py line 488, I changed:
        if subcat not in ('list', 'add', 'remove'):
to:
        if subcat not in ('list', 'add', 'remove', 'listall'):

This had the effect of not defaulting to the wrong thing when the user requests 'listall'.

The rest of it may not help you, as the functionality I needed was already there, I just needed access to it. I changed line 814 from:
if len(all) < chunksz:
to:
if len(all) < chunksz or subcat == 'listall':


Presumably I could have just as well have added an elseif to handle that (as I may well do to make it *just* a list of members and not a form).

Jerry
[EMAIL PROTECTED]
http://www.sandiego.edu/~jerry/
Serra 188B/x8773
--
"The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at and repair."--Douglas Adams (Mostly Harmless)



------------------------------------------------------ Mailman-Users mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/

This message was sent to: [EMAIL PROTECTED]
Unsubscribe or change your options at
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to