Allow users that aren't registered to subscribe...
Shiny - February 28, 2007 - 23:03
| Project: | Mailman Manager |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Shiny |
| Status: | needs review |
Description
configurable by admin, all subscription when not a user of the website.
Also provide the url to the mailman interface if they don't want to use this.
If no-one objects, i'll build this feature myself :-)

#1
Thoughts --- should be on a per list basis.
I've hooked this module further into the forms api - so it uses the _validate and _submit to handle list creation.
Next a database patch to create a boolean column, "allow_anon".
#2
A better approach might be to support user roles. Being able to restrict different lists to different users roles is really an essential feature.
#3
Hi, I've just implemented a version of this for a site I'm working on. See attached php code
It works so that you can add php into any page which will produce the appropriate subscribe form, or link to archive for a particular list
For an anonymous subscribe form:
print drupal_get_form('mailman_manager_subscribe_form', 'list_address@example.com');For a link to an archive:
mailman_manager_archive_link('list_address@example.com', 'Goto the archive for this list');Seems to work well for my site, but if I hit anymore bugs I'll update
#4
awesome-ness of the form api!
#5
very nice addition. i am having an issue where i have two submit forms on the same page for two different lists and for both submits submit a request to the first mailing list (list with the higest lid).
#6
there's some bugs reported to investigate.. but otherwise awesome
can you submit this as a patch? there's some info on creating a patch file here:
http://drupal.org/patch/create
you'll want to change this:
<?php$query = "SELECT * FROM mailman_lists WHERE name = '$list_address'";
$result = db_query($query);
?>
to this
<?php$query = "SELECT * FROM mailman_lists WHERE name = '%s'";
$result = db_query($query, $list_address);
?>
also, run it by the code style script e.g.
drupal/scripts/code-style.pl drupal/modules/all/mailman_manager/mailman_manager.module
this will point out where you've missed some of the coding style standards, which are also here:
http://drupal.org/coding-standards
thanks heaps for your work here, it's a feature that's going to be of use to many folks
-- Brenda
#7
This is my first time doing any development for Drupal, so forgive me if I messed up somewhere.
I created a patch incorporating the changes to allow anonymous users to subscribe to lists. I made the following changes to the code:
1. Made change mentioned in comment #6.
2. Added spaces/quotes where suggested by code-style.pl.
3. Removed echo of mailman command (e.g. subscribe no-digest email=...) when users click Submit button. This can be re-enabled by commenting out line 735 and un-commenting 736.
#8
Worked pretty much as advertised for me -- although the patch would not take on the 5.x-1.1 version of the mailman_manager code, just on the 5.x-1.0 code.
#9
Do you mean that the patch does not apply or that it does not work as aspected when it's applied?
#10
Patch does not apply on 5.x-1.1. Applies and works fine on 5.x-1.0 version.
#11
The previous patch removed some lines (as far as I can tell; I'm not a regular user of diff). This new one simply adds the appropriate lines. I have tested it with 5.x-1.1 and it works.
#12
If for some reason your patch fails, try removing the space in the filename above between 'r' and '_'.
#13
Is this patch gonna be commited? I'm looking for that function...
#14
#15
I'm looking at the patch, looking to port it to the DRUPAL-6--2 branch.... more as it develops.
#16
Thoughts.... this seems to be part of the configuration of the D-6 version (not sure about D-5)... it doesn't work, however. The link that comes up for the anon user, '/user/0/mailman_manager', is backed by code that explicitly checks for uid=0 for the auth check.
I'm interested in helping out, just want to see what the status is first.
thanks, tod