CVS edit link for slashrsm
Recently I developed a moule that allows site owner to send sequenced newsletters. For example:
- user registers into the site/subscribes to newsletter
- there are N newsletters that new users get every day, N days after registration
- so new user will keep recieveing newsletters for N days
- first letter is always the same, no matter when user actually registers, same for second, third, ..., Nth
- when user has recieved all sequenced emails, stops getting them
Dependency for this module is Simplenews and Date API. It was developed for one of my clients, and it is already used in production. Anyway, to make it more usable in different situations I must do some more work on it, but I would like to get some feedback from the community while doing that. I hope I will get that if I publish it as a project on Drupal.org.
Current code is at Github:
git://github.com/slashrsm/sequenced_newsletter.git
Demo installation:
http://sequenced_newsletter.janezek.org
admin user: admin
pass: sequencednewsletter
Look for "Sequenced newsletter" admin page and "List of sent letters" page.
JAnez
janez@janezek.org
Comments
Comment #1
slashrsm commentedUploaded code.
Comment #2
avpadernoHello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review the code, pointing out what it needs to be changed.
Comment #3
slashrsm commentedOK. Will wait for review. THX for all.
Comment #4
Scyther commented1.
Don't use t() on title and description.
Default type is MENU_NORMAL_ITEM so you don't actually need do write it.
2.
Can be found at more places.
3. Please remove all the "debug" comments. eg.
// print_r($subs_array);Comment #5
slashrsm commentedFixed that.
Just a question.... Since we do not use t() in title and desc... It is translated automatically?
Comment #6
avpadernoMenu titles and descriptions are passed to
t()from Drupal core code.This is similar to what done from
watchdog(); the second argument is not a translated string, but a string thatwatchdog()will pass tot().Comment #7
slashrsm commentedTHX for the explanation.
Comment #8
Scyther commentedSmall details:
1. array with a small "a".
2. The do it ;)
You can use " " instead of ' ' here and skip the \ before 's
Comment #9
slashrsm commentedCommited requested changes.
Comment #10
Scyther commentedCoder reports
sequenced_newsletter.module Line 13: There should be no trailing spaces.
Please use Coder and check your code before posting it here. It helps both me, you, and others that don't have to check and correct more times then needed.
Comment #11
slashrsm commentedSorry for that. Now I checked the code with that module. It should be OK now.
I apreciate your patience!
Comment #12
slashrsm commentedIt looks like the reviewing process stoped a bit....
Can I do something to make this go on?
Comment #13
slashrsm commentedComment #14
Scyther commentedI don't have no tips to get this done faster. For me, I don't have so much time to spend on this so it may take some times for me to review and respond. Hang in there and continue with the good job and hopefully you will be approved soon.
$row['mail'] and $row['title'] is that user-submitted content? If yes (I think so), then it should be passed into check_plain() first.
from http://drupal.org/writing-secure-code
Comment #15
slashrsm commentedFixed and checked again with Coder.
Thank you for all suggestions. I appreciate your effort!
Comment #16
Scyther commentedDo this alternatives do something?
- - -
Code looks good otherwise.
Comment #17
slashrsm commentedThat was some options used just for debugging. Since I do not see any need to send emails every minute I removed it for now. I already have plans for future, when I will probably make this option more general. As that i will allow user to declare custom period time.
Comment #18
Scyther commentedMisspelling on "diabled" maybe?
- - -
What is the big different between your module and this http://drupal.org/project/simplenews_scheduler ?
Comment #19
slashrsm commentedSimplenews Scheduler will create a new "edition" of same newsletter node and send it when it is a time to do so. It will keep doing so until schedule is removed or subscriber unsubscribes from mailing list.
Sequenced newsletter will take different newsletter node every time and send it to subscriber.
Main differences are:
Comment #20
Scyther commentedOkey! Sry I didn't get it when I read your first post, I was a bit tired.
Comment #21
slashrsm commentedNP :)
Comment #22
Scyther commentedFor now I don't have any more to add. Maybe kiamlaluno can take a look at it and see if it should be approved.
Comment #23
slashrsm commentedTHX for your effort!
Comment #24
slashrsm commentedComment #25
avpadernoThe users who are applying for a CVS account cannot change the status of their own application to RTBC.
Comment #26
slashrsm commentedI'm sorry. I thought #22 is enough to do that... I'm still adopting Drupal's workflow and sometime I do not know what is OK to do and what not.
Thank you for your feedback.
Comment #27
Scyther commentedDid a overview again and found some.
1. Try not to use escape char \' in a t(), you can use " " around the text here instead.
2. _sequenced_newsletter_list_letters() you might want to reconstruct. Maybe use a theme function to put out the list, so it can be overrided. But after a while that list will be very long and you might want to add a pager option.
These two points are not errors, but proposals to improve. I have also tested the module and it work fine. So I will say this module is ready.
Will set this to rtbc and if kiamlaluno or someone else thinks that this two points should be changed before an approval, please make a note.
Comment #28
avpadernoEscaping the string delimiter in a string passed to
t()causes the string shown in l.d.o to contain\'; it should be fixed before the first official release of the module is released.I trust Scyther for doing an accurate review, and I am going to approve this application.
Thank you for your contribution! I am going to update your account.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
I thank all the dedicated reviewers as well.
Comment #29
slashrsm commentedTHX you all!
Comment #32
avpaderno