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

Sutharsan - January 17, 2008 - 00:00

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

forums4poc - August 5, 2008 - 14:00

Hi,

How to create a signup block for selecting multiple newsletter in drupal 5.x

Please help me

#3

Sutharsan - August 12, 2008 - 07:30

@forums4poc, it is not good practice to use an issue for a related question. Please create a new issue for your support request.

#4

zoo33 - September 8, 2008 - 14:13
Assigned to:Benjamin Melançon» zoo33
Status:active» needs review

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/subscriptions and 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

Sutharsan - September 8, 2008 - 15:38

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

zoo33 - September 8, 2008 - 16:12
Status:needs review» active

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

Sutharsan - September 8, 2008 - 18:31

Indeed. I have no plans to extent Simplenews 5.x with new functionality.

#8

zoo33 - September 8, 2008 - 21:33
Version:5.x-1.x-dev» 6.x-1.x-dev
Status:active» needs review

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

AttachmentSize
simplenews_all_subscriptions_block.patch 5.04 KB

#9

Sutharsan - September 9, 2008 - 06:16
Status:needs review» needs work

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

zoo33 - September 9, 2008 - 07:52
Status:needs work» needs review

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.

AttachmentSize
simplenews_all_subscriptions_block-whitespace.patch 11.17 KB
simplenews_all_subscriptions_block.patch 5.11 KB

#11

pebosi - September 17, 2008 - 12:58

Could you update your patch to the latest dev Version?

regards

#12

zoo33 - September 17, 2008 - 23:57

Here is an updated patch.

AttachmentSize
simplenews_all_subscriptions_block-whitespace-2.patch 11.77 KB

#13

dschneider - April 3, 2009 - 23:42

I'd love to see that in the module. What's blocking that issue? May I be of any help?

#14

zoo33 - April 5, 2009 - 09:37

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

yngens - April 5, 2009 - 14:38

subscribe

#16

zonny - May 11, 2009 - 09:58
Title:Better newsletter signup block with checkbox or radio button option for multiple newsletters» how can I patch the file?

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

zoo33 - May 12, 2009 - 17:21
Title:how can I patch the file?» Better newsletter signup block with checkbox or radio button option for multiple newsletters
Status:needs review» needs work

The patch probably needs to be updated because of other changes that have been made to the module since it was created.

#18

cesareaugusto - May 18, 2009 - 12:55
Category:feature request» support request

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

tgeller - May 28, 2009 - 04:24

subscribe.

#20

criz - June 12, 2009 - 00:21
Status:needs work» needs review

Patch from #12 rerolled against the current version in CVS. Works for me.

AttachmentSize
simplenews_all_subscriptions_block-whitespace-3.patch 11.77 KB

#21

criz - June 12, 2009 - 00:22
Category:support request» feature request

#22

mnp - July 21, 2009 - 06:32

subscribe

#23

seren10pity - August 3, 2009 - 09:33

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

backdrifting - September 16, 2009 - 20:18

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

matteoraggi - November 30, 2009 - 10:01

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.

 
 

Drupal is a registered trademark of Dries Buytaert.