subscriber profiler patch for mailman-2.0.5
hi folks,
i've written a patch to mailman-2.0.5 that lets it handle subscribers' profiles. (is this the "member profiles" feature on the wishlist?)
the patch is available at: http://www.srikant.org/~sh/src/mmprofiler/mm-2.0.5-prof-0.7.gz a screenshot of it in action is at: http://www.srikant.org/~sh/src/mmprofiler/screenshot.jpg
this is my first serious attempt at python. so please be warned. :) feel free to comment.
swee heng
====================================================================== Brief Documentation ^^^^^^^^^^^^^^^^^^^
how to install it: ^^^^^^^^^^^^^^^^^^ this will create Mailman/Cgi/profile.py, cgi-bin/profile and three
- "patch -p0 <" the patch to mailman-2.0.5
- do the usual "./configure; make; make install"
templates files (prof_login.html, prof_list.html, prof_user.html) in templates/. it will also modify Mailman/Cgi/edithtml.py so that list admins can change the look of the templates.
how to use it: ^^^^^^^^^^^^^^ for currently existing lists, you need to copy the template files: cp templates/prof_* lists/the-existing-list/ for new lists, nothing needs to be done. finally, visit the URL: http://your.domain/mailman/profile/view/name-of-list
notes: ^^^^^^ private_roster == 0 or 1. it is made available only to list admins when
- profile information is made available to list members and admins when
private_roster == 2. profile information is not available otherwise.
the database is really just a collection of pickles, one for each subscriber, stored in lists/name-of-list/profiles/.
i've used a whole slew of replacement MM tags, but they all look like <MM-P-foobar> or <MM-P--privatefoobar>. they won't pollute other tags.
Hi,
On Wed, May 30, 2001 at 07:56:40PM +0800, Swee Heng wrote:
i've written a patch to mailman-2.0.5 that lets it handle subscribers' profiles. (is this the "member profiles" feature on the wishlist?) this is my first serious attempt at python. so please be warned. :) feel free to comment.
looks great to me... maybe this would be a good solution for this much requested feature for this version of mailman untill we get the database stuff in mailman 3.0... maybe some of the mailman developers can comment on this? I can't comment that much on the contents of the patch though it seems not to have a huge impact on the rest of the code base as far as I can tell...
my comments:
- the subscribers list on the right could be usefull but if you have a list with 10k subscribers maybe that's not such a great idea :)
- am I correct to assume that you can use the MM tags in the templates to 'dynamically' invent the profile field names used?
Regards,
Ricardo
| looks great to me... maybe this would be a good solution for this much thank you. that's very encouraging. :)
| this? I can't comment that much on the contents of the patch though it seems | not to have a huge impact on the rest of the code base as far as I can | tell... i've tried to minimize the impact to the original code. the only original files modified are src/Makefile (i added " profile") and edithtml.py (i extended the list of edittable pages).
| 1) the subscribers list on the right could be usefull but if you have a list | with 10k subscribers maybe that's not such a great idea :) indeed. :) actually i simply copied the idea from roster.py. each member adds about 0.1kb. so 1000 members gives a file size of about 100kb. 10k members gives a file size of 1Mb. ouch! :)
| 2) am I correct to assume that you can use the MM tags in the templates to | 'dynamically' invent the profile field names used? yes. <MM-P--tags> are used by profile.py internally while <MM-P-tags> are for the profile field names. the "database" entry for joe@random.org is a pickle of the dictionary : { '<mm-p-realname>' : 'Joe Random', ... }
regards, sweeheng
participants (2)
-
Ricardo Kustner
-
Swee Heng