Needs work
Project:
Simplenews Scheduler
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
31 May 2010 at 13:16 UTC
Updated:
29 Oct 2012 at 13:42 UTC
Jump to comment: Most recent file
Comments
Comment #1
joachim commentedThe use case of an email training course seems out of scope here, for the same reasons I give over at #940420: Ability to schedule a relative time.
As for an edition counter, that is something we could make available to the alter hook. Though this feature request is pretty old so I doubt the requester is around any more (and the stop count doesn't work at all on D6 right now...).
Bumping this to D7 anyway, for discussion of its merit and usefulness.
Comment #2
SiteMaster.ServeLime.com commentedThanks for not forgetting this one :)
Still relevant.
Comment #3
dgtlmoon commentedTry this one.. no test just yet
Comment #4
dgtlmoon commentedComment #5
dgtlmoon commentedRe-queueing with patch for testing
Comment #6
dgtlmoon commentedThis introduces new token [simplenews-scheduler:edition-number]
Comment #7
miro_dietikerA good idea! :-) - And a short review.
Documentation missing: If an edition was deleted after sending during a newsletter lifetime, numbering won't be clean. There will be duplicate "numbers".
I think it's just too much on one line. Wrapping?
Missing a space.
Comment #8
dgtlmoon commented" If an edition was deleted after sending during a newsletter lifetime, numbering won't be clean. There will be duplicate "numbers"."
What do you propose? do a left join and see which nodes still exist at that time?
Comment #9
miro_dietikerI would just clearly document this condition/limitation.
When going through the code i see that the limitation isn't here yet anyway.
#1795674: Rows in simplenews_scheduler_editions getting orphaned
It never deletes any rows. We could avoid that limitation by persisting the simplenews_scheduler_editions for as long as the scheduled newsletter exists.
Alternatively we could also persist a counter column in the simplenews_scheduler table. We would then have no dependency to previous simplenews_scheduler_editions rows.
Advanced users might need a custom edition definition anyway:
Monthly edition creators wouldn't care about absolute numbers, but more about an YYYY-MM notation.
This can e.g. be built with rules.
Comment #10
dgtlmoon commentedyou're making it complicated about what people should do/can do that is not the original request for this function, but yes, maybe even a simple variable_set('simplenews_scheduler_editions_set_'.$nid, $n++); could be enough
Comment #11
miro_dietikerI just wanted to warn you about the side effects :-)
Using variables is possibly the worst solution but would work...
I'm perfectly fine with putting the code as-is into the repo, if you add documentation about the limitation. Maybe for some it's no limitation but even a feature!
Comment #12
dgtlmoon commentedI think a warning in with the token description might be a good too