[Mailman-Users] Re: [Mailman-Developers] Extending mailman (adding config options)
Barry A. Warsaw
barry at zope.com
Wed Jul 17 22:34:24 CEST 2002
>>>>> "LB" == Laurence Berland <laurence at digitalpulp.com> writes:
LB> Those of you following my previous emails (lamentably
LB> unanswered so far) will already know that I'm trying to extend
LB> mailman to add color-coded graphics to the archives to parse
LB> logwatch emails and such more efficiently.
LB> I'd like to have this configurable from the archive options
LB> page, so I was wondering what the standard structure for
LB> adding options is. Is there a premade set of mailman
LB> functions for extending this in a standard and non-kldugy way,
LB> and are they accessible as is from HyperArch.py?
I'm not totally sure what you're asking about, but there is definitely
a recipe for adding new mailing list configuration options.
Briefly outlined:
- Decide on an attribute name (or names if there are more than one).
Be sure they don't collide with existing names.
- Decide what the data type will be ("bool", int, strings) -- for
simplicity try to stick to one of the 13 existing "Enumeration for
Mailman cgi widget types" defined in Defaults.py.in
- Add attribute init code for newly created lists. For
archiver/pipermail options, these would go in Archiver.InitVars() in
Mailman/Archiver/Archiver.py
- Add support for "schema updating" for existing lists. If you're
adding new config options, this probably means adding a few lines to
NewVars() in Mailman/versions.py
- Bump the DATA_FILE_VERSION so the schemas will auto-update on next
MailList object load.
- Add the gui goo (i.e. the widget descriptions). For the archiver
admin page, you're talking about adding to the returned list in
Archive.GetConfigInfo() in Mailman/Gui/Archive.py.
HTH,
-Barry
More information about the Mailman-Users
mailing list