| Project: | Simplenews |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
Hi everybody!
it took me long hours but I make it work! this patch allows you to send newsletter issue to multiple newsletters! and even better, it's for D6!!!
Now, I created it against the HEAD, I think it is better for apply by the maintainer. I haven't tested it on 6.x-1.0-rc6.
This patch make a change on simplenews.install, it change the type of the field "tid" in the table "simplenews_newsletters". If you apply this patch against a working website, you should change it by hand on the DB.
One more thing, to enable this feature you have to go to admin/settings/simplenews/general and check the "Multiple select" checkbox.
Hope it helps! please any questions let me know.
Thanks!
--
Jose Sanchez
www.deviancefactory.com
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| simplenews_multiple_newsletters_d6.patch | 16.36 KB | Ignored: Check issue status. | None | None |
Comments
#1
Just made a little change on simplenews.install.
Thanks!
--
Jose Sanchez
www.deviancefactory.com
#2
I was able to apply the patch and everything looks ok but i havent tested it yet. we will be sending a newsletter out this next week i will report back ^_^
Thanks for your time and effort!!
#3
Thanks, great works!
I test this and find theme for suggestion: subscribers with 2 or more subscriptions on each selected terms give 2 or more message with different subject and identical text.
#4
Added an update function to change tid field automatically on update.php to #1's patch
regards
#5
i just send a test newsletter issue to multiple newsletters and it's working fine for me.
regards
#6
This construction of IN(%s) with the implode() not allowed
WHERE s.activated = %d AND t.tid IN (%s) AND t.status = %d', 1, implode(',', $node_data['tid'])you need to use db_placeholders()
I appreciate the effort done to realize this functionality but I'm not realy glad with the impact it has on Simplenews developement. I'm currently working on changes to the way taxonomy terms integrate in Simpelnews. With those works on its way I'm not enthousiastic of committing this patch since it will make this change more complex.
#7
Hi!
thanks for your suggestion, I'll change it ASAP.
Im pretty exited about the new taxonomy integration, but I think this little path will solve the problem that some people is having today.
Please if you need some help let me know, I'll be glad to help on simplenews, it's a module that I use a lot.
Thanks!
--
José Sánchez.
www.deviancefactory.com
#8
Hello
Thanks a lot for the wok on simplenews...
I understand your concern about the patch done here it you are working on something related but I want to express my shared concern for this need.
We can have two views on this issue and one seems better than the other but maybe more complicated to implement.
* First you can do as Josegabriel.st did and allow an issue to be send to multiple "newsletter", making a duplicate issue automatically ...
* second we can have better subscriber management allowing us to have a concept of LISTS or contact groups and a default one for each newsletter, and for each issue we could pick the contact group (or audiences) we want to send the newsletter issue to.
The big advantage of the second idea is that is is more clear, more natural and more importantly that it avoids duplication of the contact addresses in the various newsletter subscription.
Thus you can have separate audiences and mix and max what you send to them on a issue by issue basis ...
This would make SimpleNews much more useful than it already is, and turn it in a great "group mail communication tool"
#9
subscribed.
#10
subscribing... when will the patch be implemented in the module?
#11
Subscribing. I would love to see this in the core of SimpleNews.
#12
Subscribing... I'm trying to move out from phplist and to simplenews and this really bugs me
#13
Subscribing...
#14
Subscribing...
#15
Hi,
I implemented this patch on version 6.x-1.0 but I am not getting a multiple select box on the create a newsletter screen. I still get the drop down. Any ideas?
#16
To keep you updated. With simplenews upgrade to D7 well on its way I can confirm (see #6) that taxonomy is removed from simplenews completely, a simplenews category is introduced instead. Although not yet implemented, I have plans to support sending newsletter issues to multiple mailing lists. So I will not use this patch, but josegabriel.st thanks any way for the inspiration.
Keeping the issue open for further response and use cases.
#17
Hi!
sol1313:
Have you checked the "Multiple select" checkbox in admin/settings/simplenews/general?
Sutharsan:
that sounds pretty awesome!
Thanks!
--
José Sanchez.
#18
Hey José,
can you please upload an updated version of the patch working with 1.1 version of simplenews? Also, what's about adding some SQL GROUP BY into the query selecting subscribers to avoid duplicates when sending emails?
thanks in advance
#19
Hi brainchild,
I wont make me time to do that the next weeks.
Sorry!
--
José Sánchez.
#20
Hola José,
Can you please tell me which version of simplenews did you used to create this patch ?
I can't find the correct version to patch...
Gratias !
#21
Trying to figure out if this will work for my client. Do I understand this right? With this patch, you can now send one newsletter to multiple groups. However, it will not weed out duplicated emails, so if a person is subscribed to both groups, they receive two copies of the same email. Is this correct?
Does anyone have any ideas for a quick hack to weed out the duplicates?
#22
This is a pretty easy/ugly SQL hack I have used to get around this.
PLEASE MAKE A BACKUP BEFORE ATTEMPTING THE FOLLOWING
This SQL command will create a new table without duplicates:
CREATE TABLE simplenews_mail_spool2 asSELECT * FROM simplenews_mail_spool WHERE 1 GROUP BY mail
After running that delete the original table, simplenews_mail_spool, and rename the new table, simplenews_mail_spool2, to the old name.
#23
Subscribing....
#24
Thanks!
#25
Thanks! Exactly what I was looking for.
Just one question: what would be the exact change I have to perform on the database on a running site? I can't seem to figure that out from the code in the patch.
#26
Hmmm...I tried applying the patch in #4 and got the following error when attempting the GIT command:
simplnews_540432.patch:63: trailing whitespace.
simplnews_540432.patch:72: trailing whitespace.
Checking patch simplenews.admin.inc...
Hunk #1 succeeded at 764 (offset -8 lines).
Hunk #2 succeeded at 784 (offset -8 lines).
Checking patch simplenews.install...
error: while searching for:
),
'tid' => array(
'description' => t('The {term_data}.tid (= newsletter series) this issue belongs to.'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
's_status' => array(
'description' => t('Send status of the newsletter issue (0 = not send; 1 = pending; 2 = send). '),
error: patch failed: simplenews.install:70
error: simplenews.install: patch does not apply
Checking patch simplenews.module...
error: while searching for:
$node->simplenews = array_merge(_simplenews_get_node_form_defaults(), is_array($node->simplenews) ? $node->simplenews : array());
$term = simplenews_validate_taxonomy($node->taxonomy);
$tid = is_array($term) ? array_values($term) : FALSE;
$node->simplenews['tid'] = $tid ? $tid[0] : 0;
break;
case 'insert':
case 'update':
error: patch failed: simplenews.module:366
error: simplenews.module: patch does not apply
#27
Patching latest 6.1.3 version doesnt work. I get these errors.
patching file simplenews.admin.inc
Hunk #1 succeeded at 764 (offset -8 lines).
Hunk #2 succeeded at 784 (offset -8 lines).
patching file simplenews.install
Hunk #1 FAILED at 70.
Hunk #2 FAILED at 638.
2 out of 2 hunks FAILED -- saving rejects to file simplenews.install.rej
patching file simplenews.module
Hunk #1 succeeded at 375 with fuzz 1 (offset 9 lines).
Hunk #2 succeeded at 389 (offset 9 lines).
Hunk #3 succeeded at 435 (offset 9 lines).
Hunk #4 succeeded at 1406 (offset 7 lines).
Hunk #5 FAILED at 1417.
Hunk #6 succeeded at 1520 (offset 4 lines).
Hunk #7 FAILED at 1547.
Hunk #8 succeeded at 1589 (offset 15 lines).
Hunk #9 FAILED at 1603.
Hunk #10 succeeded at 1629 (offset 17 lines).
Hunk #11 succeeded at 1687 (offset 17 lines).
Hunk #12 succeeded at 1697 (offset 17 lines).
Hunk #13 succeeded at 1790 with fuzz 2 (offset 46 lines).
Hunk #14 succeeded at 2020 (offset 47 lines).
Hunk #15 succeeded at 2214 (offset 60 lines).
Hunk #16 succeeded at 2323 (offset 69 lines).
Hunk #17 succeeded at 2544 (offset 52 lines).
3 out of 17 hunks FAILED -- saving rejects to file simplenews.module.rej
#28
No new feature will be added to 6.x-1.x.