Hi,
I'm posting a sub module for the Notifications Module group for those who might be interested and for Notifications developers to look at and test.
The module enables users to send out notifications of upcoming and recent events. Time scales for both can be set in admin and users can select on/off in their account. Admin can select what event content types to include and the frequency of mailouts. The module runs on cron as well as having a manual send button. (There is currently a 'subscribe all users' button also.)
The module uses the notifications queue system, however instead of accumulating over time, all items are processed in a batch at the time of sending. It was decided to use this system because it was there and also because saving items to a database queue (rather than processing live through a php object) helps in the event of an email bottleneck which could quickly overwhelm the object.
The code has not been used extensively and should be considered alpha.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | notifications_event.tar_.gz | 8.7 KB | NewZeal |
| notifications_event.zip | 6.86 KB | NewZeal |
Comments
Comment #1
jose reyero commentedThis will go in this other package, just for 6.x
Comment #2
danepowell commentedSince this is only going to be implemented in 6.x, and events has no 6.x release yet, I'm postponing this. However, I think it would make more sense for this to be a standalone module anyway, similar to Notification Locations. In fact there is already an event_notification module, so perhaps you should consider merging with that.
Comment #3
NewZeal commentedThis module has already been submitted to http://drupal.org/project/notifications_extra.
There is some confusion in nomenclature in that the notifications module system refers to system events such as insert, update, delete as events. The notifications_event module does not handle these kinds of events, it handles nodes with time based fields such as used by the event module or cck date field. This is completely different from the other event_notification module so there is no question of merging.
Comment #4
danepowell commentedI'm confused now - I thought the patch that the OP submitted was to add "reminder" sort of notifications for Events (as in calendar events, generated by the Events module). This functionality does not currently exist in notifications_extra AFAIK. This sounds like a good feature to have, but I don't use the events module myself so I can't help to implement it.
Are we all on the same page, or am I missing something? :)
Comment #5
jose reyero commented@Dane,
Yes, I think we are talking about that reminder type of notifications
@New Zeal,
You can commit the module here anytime, it doesn't matter if it's a rough development version yet. We can later move it into its own project if you want to. (Or you can create a new project right away, this 'extras' module is just to save that overhead for all these small add-ons we are working on)
Comment #6
NewZeal commentedI confirm that you are on the right track and this module provides notifications on a regular basis of calendar events created either with the event module or with cck date fields.
The module is in good working order however its configuration may need to be expanded to meet other people's needs (eg some field names are fixed at the moment)
I have a CVS account so I can commit the module anytime especially if someone is interested.
Comment #7
rjbrown99 commentedWas this written for 5.x? Seems that way... the .info file needed adjustments and db_num_rows() is used in the module and that was deprecated in Drupal 6:
http://drupal.org/node/114774#db-num-rows
As it stands, the module will white screen of death based on the db_num_rows call.
Comment #8
petednz commentedrj - do you have a version that is working for D6 that we can do some testing with? Thanks
Comment #9
rjbrown99 commentedI started hacking at it but didn't get too far yet. I fixed the info file so it can be enabled and removed the db_num_rows() which causes a white screen of death. Otherwise I haven't had time to look at it. I might find a bit of time this week. In the meantime if you are working on it feel free to submit any changes back to the thread.
Comment #10
NewZeal commentedPlease note that this module has been submitted here: http://drupal.org/project/notifications_extra and the version available at the top of this thread is an earlier version which is not fully functional.
Comment #11
rjbrown99 commentedI'm confused - the link for notifications_extra cycles back to the same module and issue queue. When browsing the CVS repository, there is a directory for notifications_event but there is no code in it.
http://drupalcode.org/viewvc/drupal/contributions/modules/notifications_...
Comment #12
rjbrown99 commentedNew Zeal - can you help? If there is a more recent version of the module I'd love to know about it so I am not duplicating efforts to port it to D6. So far I have browsed the entire CVS structure and version tags and don't see any code for this (up to and including HEAD.) I also searched around the Drupal site and Google but it doesn't seem like this updated module is anywhere to be found. Thanks.
Comment #13
NewZeal commentedMy CVS login is currently telling me it doesn't work, so I have attached the module to this comment. Note that Drupal has renamed the file. It is a standard tar.gz.
Comment #14
rjbrown99 commentedAhh thank you! I was starting to look at the old module to port it over. My time is much better spent enhancing/adding to what you already did. I appreciate it!
Comment #15
rjbrown99 commentedSo far here is my feedback:
-- The module enabled just fine
-- All menu options for both the admin and normal users appear and can be changed accordingly
-- So far, using the messaging "simple messaging" module, I have not been successful in obtaining a notification. I'm using this module to avoid SMTP and ensure I can first get it working with a super basic notification type.
Here's what I did from the regular non-admin user perspective.
1) Went to /user/XX/edit, enabled default send method (Web), interval immediately.
2) Went to /user/XX/notifications, calendar event content types, checked the box for my content type, save. I now see a subscription, send method Web, send interval immediately.
3) Using the event module, created a new event node. Checked "Event has time", used today's date a few minutes into the future. There is no end date.
4) Waited until that time, and no message arrived. Manually ran cron, but no message is arriving.
5) As an admin user, I also went to admin/messaging/notifications/calendar_events/batch_processes and "subscribe all users" and "process event mailouts" which also did not send a message.
I'm now in the process of trying to pull the module apart and understand which functions handle timing and the actual event send process.
As of now, it looks like I am failing inside of the function notifications_event_process_events, in this code block:
Removing the WHERE makes it work for my single content type, so the SQL logic around event start/stop may be an issue. In my case $past is 1263511716 and $future is 1263511716.
Comment #16
rjbrown99 commentedOK, I got it working.
$past and $future are dates stored in Unix timestamp format such as 1263511716. In the SQL statement they are being compared against a DATETIME field, which looks like this: 2010-01-15 16:35:00.
Here's what worked for me, it just changes the event_start field to a timestamp so the comparison works.
Comment #17
NewZeal commentedThanks for that Robert.
I have made those changes to the code and submitted the module to the correct location.
This module is a one off I made for a client. Their date field must have been a different format. This functionality is probably easier done using a different system but once I started with notifications I felt committed. Certainly if a site has a large number of event notifications to make, then having it part of notifications certainly helps.
Comment #18
rjbrown99 commentedThanks. FWIW, I actually think this is the 'right' way to do event notifications. There are a bunch of other modules with similar functions but notifications gives you a ton of different sending methods to use from e-mail to twitter to SMS to iPhone alerts.
I'm planning to start using this for an event reminder system internally with a group. Should be interesting, now the only problem is that the messaging framework isn't picking up on the node tokens like [title]. I want the text of the notification message to be the title and body of the event and now need to figure out where the token support is breaking down.
Comment #19
rjbrown99 commentedSo far the module itself works to send a notice, however token support is unfortunately not working well. Replacement tokens such as [user] are working, but most others like [title] and [yyyy] are not.
Comment #20
rjbrown99 commentedI don't yet know what the issue is, but I suspect it is within the function notifications_event_process_rows(). The following line is the one that is supposed to call out to the function that fills in the tokens:
If I look inside of the $events variable right before it is sent, it shows this:
... which is basically no events. The $events variable never seems to get set as far as I can tell. These lines are interesting:
because the $queue->eid is 0 in every case. This is probably the root cause. Here's what that object looked like for me.
The sqid increases with each new event notification but eid is always 0.
I have no fix, just sharing. Thoughts and suggestions are welcome.
Here's a direct link to the code, and the relevant section starts around line 555:
http://drupalcode.org/viewvc/drupal/contributions/modules/notifications_...
Comment #21
pribeh commentedsubscribing
Comment #22
jvieille commentedSubscribing.
What is the status of this module?
Comment #23
pmathur01 commentedIs this module still being maintained? I am looking for something similar where I want to send notifications for events on certain dates Example list of all events today, this month I tried to enable this but it says it is incompatible with drupal 6.22.
Prerna
Comment #24
jvieille commentedStill interested: it looks like no out-of-the-box solution exists with Drupal to provide reminder feature.
Is the attachment in #13 the latest version? (the link in #20 leads nowhere)