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 :-)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Shiny’s picture

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".

cboshuizen’s picture

A better approach might be to support user roles. Being able to restrict different lists to different users roles is really an essential feature.

cgfoz’s picture

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

Shiny’s picture

awesome-ness of the form api!

dan.blah’s picture

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).

Shiny’s picture

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:

  $query = "SELECT * FROM mailman_lists WHERE name = '$list_address'";
  $result = db_query($query);

to this

  $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

ccb621’s picture

FileSize
4.92 KB

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.

daddison’s picture

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.

samuelet’s picture

Do you mean that the patch does not apply or that it does not work as aspected when it's applied?

daddison’s picture

Patch does not apply on 5.x-1.1. Applies and works fine on 5.x-1.0 version.

ccb621’s picture

FileSize
4.16 KB

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.

ccb621’s picture

If for some reason your patch fails, try removing the space in the filename above between 'r' and '_'.

yan’s picture

Is this patch gonna be commited? I'm looking for that function...

samuelet’s picture

Status: Active » Needs review
toddgee’s picture

I'm looking at the patch, looking to port it to the DRUPAL-6--2 branch.... more as it develops.

toddgee’s picture

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

toddgee’s picture

Is there any updates to this?

yan’s picture

Status: Needs review » Closed (won't fix)

This is possible in 6.x version. I suppose there won't be any more features in 5.x, will there?