Better newsletter signup block with checkbox or radio button option for multiple newsletters
Benjamin Melançon - January 9, 2008 - 15:11
| Project: | Simplenews |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | zoo33 |
| Status: | needs review |
Description
Agaric Design is going to write a small module to provide the option to list all available newsletters in one block so that visitors can subscribe to more than one newsletter in one action. An option to do this as radio buttons (the immediate need is for multiple translation versions of a newsletter for http://www.wsf2008.net/ ) will also be made, but maybe this isn't generally useful?
Other proposed features:
- Let registered users change the e-mail address they sign up for newsletters with
- More UI customizable options for signup blocks
- Integrate with actions so admin can set up for an alert when a newsletter is subscribed to (for bridging to legacy systems)
- Create this block outside of simplenews as a possible front-end to multiple newsletter systems, including CiviCRM/CiviMail.
Thoughts requested!
benjamin, Agaric Design Collective

#1
benjamin, it sounds very interesting. Simplenews 6 may benifit from this effort, actions integration is in my roadmap, UI improvements are always welcome and different e-mail address for users is an interesting new persprective. For Simplenews 5 this surely needs to be a module, for 6 we can discuss.
#2
Hi,
How to create a signup block for selecting multiple newsletter in drupal 5.x
Please help me
#3
@forums4poc, it is not good practice to use an issue for a related question. Please create a new issue for your support request.
#4
Hi. First of all, my apologies to Benjamin for hijacking his issue.
I needed a subscription block like this too, and since it's been a couple of months since Benjamin's post I thought I'd take the matter in my own hands and write a small module which simply loads the form that Simplenews already provides at
newsletter/subscriptionsand sticks it in a block.The module is called simplenews_multisignup and is checked into CVS. Before I publish it, I just want to check with Sutharsan if it would be better to turn this into a patch for Simplenews. Also if Benjamin has done some work in addition to what I did, then maybe we should try to merge our efforts?
#5
I propose to make a patch for simplenews 6.x-dev for this. I have the plan to make a simplenews sub-module with several extra subscription functions. This will also include the current Simplenews on Register features.
#6
OK, so maybe I should still publish it for the 5.x branch then. Guess you're adding functionality only to 6.x by now?
#7
Indeed. I have no plans to extent Simplenews 5.x with new functionality.
#8
OK, so here's a patch against 6.x. This is basically what I did in the module I was talking about. Not sure if everything is implemented the best way possible, but it works and it's a start. (In particluar, take a look att template_preprocess_simplenews_block_all() where I had to include an inc file manually.)
#9
Thanks for the patch. It is usefull as a start. However I would use an alphanumeric delta (e.g. 'all-newsletters') instead of '0'. You could move the preprocess function to the simplenews.subscriptions.inc. This would get rid of the include_once(). And last (but not least) please observe the indentations where you have added curly brackets.
#10
That's excellent input!
I forgot to mention that I used the -b option (i think it is) to ignore whitespace, so that the patch would be easier to read. I'm including two versions of this new patch, one with whitespace changes and one without. (I actually found a whitespace error in the current
hook_block($op = 'view').)I followed your suggestion for the include file (should have been obvious to me). Also simplified and cleaned up a few things.
#11
Could you update your patch to the latest dev Version?
regards
#12
Here is an updated patch.
#13
I'd love to see that in the module. What's blocking that issue? May I be of any help?
#14
The patch may need to be rerolled against the current version in CVS by now. Other than that, positive reviews and tests always help.
#15
subscribe
#16
I need some help, please.
I have all 4 patch file in folder (modul) "simplenews_multisignup" stored and updated. I get the following error message:
>patch -p0 < simplenews_all_subscriptions_block.patch
patching file simplesnews_/simplenews_all_subscriptions_block.patch
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354
This applicaton has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.
#17
The patch probably needs to be updated because of other changes that have been made to the module since it was created.
#18
What about the status of this multiple newsletter signup block? How could I get it work on my website? I read this featur shall be implemented into the main 6.x version module. I installed it but I cannot find any feature of this kind. I'm a newbie into Drupal :) Can anyone help me? Thanks! :D
#19
subscribe.
#20
Patch from #12 rerolled against the current version in CVS. Works for me.
#21
#22
subscribe
#23
Hi, I implemented the patch on the lates dev version of simplenews, but I can't see any new options to combine the subscription blocks into one.
Could it be a versioning problem, or maybe I didn't watched the right place ? What is supposed to change ?
thanks.
#24
This is actually posted as a module here:
http://drupal.org/project/simplenews_multisignup
This way you don't have to run the patches. The module does it. I just installed the 6.x dev version and it works fine.
Hope that helps.
=backdrifting
#25
On block and also on newsletter/subscription for me it don'twork, it ask for n email if logghed off, but it don't show the 4 newslettes that I have on my site in drupal 6.14 using last stable version of simplenews.