Hi, this is my first patch, I hope that I do everything right (I used diff in that way: "diff -uF^function").

I added the possibility to anonym subscrbers to specify their name. It will be displayed in "Subscribers List" in the Admin part.

Maybe there is a lot of work to do. I need this feature in one web site.. I hope my patch will be usefull!

Bye! :-)

ps: I'm sorry for my poor English

Comments

RobRoy’s picture

Title: Adding username to anonym subscriptions » Allow anonymous users to specify their name along with their e-mail on subscribe form

Could you submit a patch removing any other changes besides allow users to provide their name on subscribing? There are some changes in the patch that do not relate to that. This will help get it committed.

Let me know if you plan to do this and I can help.

thepanz’s picture

Title: Allow anonymous users to specify their name along with their e-mail on subscribe form » Adding username to anonym subscriptions

Can you explain me how to do that? I'm not very skilled with Diff-and-patches!
Can I manually edit the .patch and remove the "extra" additions or is there an other way to do that?ù

Bye :)

RobRoy’s picture

If you have a clean simplenews.module and only apply the changes for name to the file. Then, create a patch according to http://drupal.org/diffandpatch.

thepanz’s picture

Status: Needs work » Needs review
StatusFileSize
new8.11 KB

Hi, I created a "clean" patch for adding an username to anonym subscription. I edited latest -dev- version.

I edited simplenews.module and simplenews.install files, the patch includes both. (I used WinMerge to generate this patch with "unified" flag set). Maybe this patch needs some adjustments to manage some special cases:

- don't display that an email address is already subscribed: privacy?
- exclude email addresses
- manage robot subscribing (Cathpa??)
...and maybe others!

let me know!

Bye

RobRoy’s picture

Status: Needs review » Needs work

Some things to check out:

  • Check out http://drupal.org/node/318 as you've got lots of style issues in there: lots of missing spaces, false instead of FALSE, etc.
  • Comments should be like "// This is a comment."
  • In addition to changing the schema in hook_install(), you'll need to add a simplenews_update_X() so current users can upgrade.
  • Patch should be done with "cvs diff -up" so we don't get your local path info in there.
  • Remove commented out code around t('Unregistered user')

It's getting there! Keep it coming thePanz! :)

thepanz’s picture

StatusFileSize
new14.24 KB

Hi RobRoy, i try to follow your instructions :)

But, without using WinMerge, I can't figure out how to "merge" 2 diff together. I'll attach the "module" patch here and the part about the simplenws.install file in my next reply.

Let me know! Bye

thepanz’s picture

StatusFileSize
new1.38 KB

Next parch: simplenews.install file.

Bye

davemybes’s picture

Tried to apply the patch on the 4.7-dev version, but it kept giving errors. Eventually I did all the changes manually. However, I don't see the Name field on the sign up block. It looks like its not accepting the new fieldset either. I ran update.php and that went OK. I have also disabled the module and re-enabled it, as well as the newsletter blocks. I also created a new newsletter. Still no name. Am I missing a step here somewhere?

mileZ’s picture

Can I use this patch with Drupal 5.1 too?

dualdiesel’s picture

*bump*

sutharsan’s picture

Version: 4.7.x-1.x-dev » 7.x-1.x-dev
Category: bug » feature

The difficulty with this approach is that everyone wants other data to store and future requests for new field are to be expected.

IMO the way forward for this requirement is a flexible one. Data to be collected will very much change from one site to another. On top of collecting the data there will surely be requirements for viewing, filtering and maintaining the data.
bevan suggests here the use of profile module. My thoughts also go towards the Bio module and CCK module. Using a node to store the subscriber data gives all the standard possibilities without a node has.

Please discuss the feature here and help to get a full picture of requirements.

Version and category changed (no new features will go into 4.7).

dualdiesel’s picture

Version: 7.x-1.x-dev » 5.x-1.0

I suppose that for now I'm better off using phplist while I wait for something to evolve.
good luck.

keesje’s picture

drupal's profiles could be a way. I have a case only anonymous users do register demselves, the site owner would realy like to personalize the newsletters with a fullname. Like "Hello %name". On top of this to know the gender would be nice, like "Hello %gender %name".
The only way to achieve this for anonymous is to make them not only fill there mail address, but also gender and full name.

This would enhance simplenews big time, since it is already such a nice module (:.

Regards,

Kees

pelicani’s picture

I'm a fan of the Bio module, but for anonymous users this won't work.
http://drupal.org/node/127178
Here is some discussion on using the webform module.
I'm going to try it out.
Seems to be an uber flexible solution.

sutharsan’s picture

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

If there will be a solution for storing custom data with subscribers, it need to be a flexible one.
This patch will not be included.