Closed (fixed)
Project:
Notifications
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Mar 2008 at 15:38 UTC
Updated:
7 Apr 2008 at 11:42 UTC
How can we control what's in the digest? All I can get is
Nodetype: Title
- Nodetype Title by Site Admin
Nodetype: Title
- Nodetype Title by Site Admin
What I need is something like
Title
Original Link
Basically when the user selects a time interval rather than immediate, I'd like them to get the same information that they would get in an individual e-mail, just all rolled into a single e-mail.
Comments
Comment #1
dfletcher commentedHi HallSL. I had this same trouble, just figured out a way to do it in a custom module using hook_notifications:
In "name" and "line" it seems you can use any of the tokens listed in "Notifications for node events" messaging settings. It seems to be ignoring my "\n" though, I guess it's being trim()ed somewhere.
This is clumsy but at least it's a solution for the short term.
Cheers,
--fletch
Comment #2
dfletcher commentedUgh, this fix worked for about a day, and then it stopped. I updated from a dev snapshot to the alpha release during this time, so I suppose that caused it. Looking for another solution now.
Comment #3
dfletcher commentedAha! It's the weight that was changed between revs. The weight of notifications_content was set to 100 in this update. The trick needed to get my code above working is that it must run *after* notifications. So a quick `UPDATE system SET weight=101 WHERE name='mymodule'` seems to have fixed it.
Cheers,
--fletch
Comment #4
dfletcher commentedIt's not the worlds greatest solution. I attempted to pull out the comment and update notifications this way too by making them blank - so they appear as empty bullets in the digest.
Putting some macros on comments and updates looks a tiny bit better, but not much. It really doesn't make sense to point to the same node more than once in the digest.
Cheers,
--fletch
Comment #5
HallSL commentedThanks much. This at least gives me something that has a useful link, instead of the title twice. I really appreciate it.
Comment #6
jose reyero commentedYeah, I had changed module weights (Some things need to happen after all the other modules have added their stuff into the node, that's why).
About this solution, it looks good, but I guess you'll like more the new
- hook_alter_notifications_event_types()
and
- theme_notifications_digest_body()
just committed.
Comment #7
jose reyero commentedAlso improved digest format for node creations. See http://drupal.org/node/218745
Comment #8
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.