Patch: auto-schedule with the Scheduler module
| Project: | Simplenews |
| Version: | 6.x-1.x-dev |
| Component: | Usability |
| Category: | feature request |
| Priority: | normal |
| Assigned: | AlexisWilke |
| Status: | needs work |
| Issue tags: | schedule |
Jump to:
Hi guys,
I'm not too sure if you agree, but I think that when a node is not published, then it should not be sent (emailed.)
If that is agreeable, then there is a very easy fix to get simplenews to mail the node only when the user scheduled it to be sent. This is done with one since SQL change testing whether the node is published. If not yet published, nothing happens (the node is ignored). If published, then the node can be sent.
And if you use the Scheduler module to decide when the node should be published, you're done. No need for a specialized module (i.e. simplenews_scheduler which is not yet available for D6)
Anyway... if you agree on that, there is a patch that checks what is necessary. Speaking of which, the simplenews_get_spool() function accepts $nid and $vid as parameters but they are not being used. Is that a bug?
Thank you.
Alexis
| Attachment | Size |
|---|---|
| simplenews-6.x-1.x-send_published_only.patch | 724 bytes |

#1
I second this patch. This is exactly what I needed.
I can see that some people may want to send unpublished nodes, but an option could always be added to handle this. By default it should not send a node unless it is published.
#2
> I'm not too sure if you agree, but I think that when a node is not published, then it should not be sent (emailed.)
Yup, that seems logical.
But this patch creates a big flaw in the UI -- I can select 'send now' when I create my newsletter AND unpublish (without knowing what this means) and then simplenews appears to not be obeying me.
So at the very least we need a bit of description on the sending options (only if the user has publishing permissions).
#3
We could also add a validation check which says that "Send now" is not permissible with Published unchecked? That way, it won't feel like it does not do anything, it will tell you what's wrong and give you a chance to fix it. What do you think?
Thank you.
Alexis
#4
Sounds good to me.
#5
I think I agree that there is a problem. I did not check the published box, but still used the scheduler module to publish at a certain time. When the time came to publish the node, it published but never sent.