Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When OG sends email notifications it only sends the teaser. This means that things like location information are not included. Could we create a setting to choose whether the body or the teaser is sent?
Comment | File | Size | Author |
---|---|---|---|
#13 | 112414_og_mail_teaser_vs_body_2.patch | 8.5 KB | dww |
#12 | 112414_og_mail_teaser_vs_body.patch | 8.51 KB | dww |
Comments
Comment #1
wallan CreditAttribution: wallan commentedI'd like to second that request!
Thanks,
Allan
Comment #2
Navinjohnson CreditAttribution: Navinjohnson commentedI will third that request!
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedok, thats enough :). if someone cares to work on this, i suggest we just reuse the preference that admin has set for rss feeds.
Comment #4
m3avrck CreditAttribution: m3avrck commentedI think there might be a better way.
CCK *now* has a new display settings where you can explicity set *what* shows up when: teaser, full node, RSS, etc...
OG should ideally tie into this and/or work with this feature. I'm not sure how, but that would be the *best* starting point, seeing that OG is now CCK & Views aware.
Comment #5
dwwThis is nailing me, too. :( Why not just have both a @body and @teaser placeholder and let admins choose which one they want?
Moshe, if that's agreeable, I'll roll a patch. That which is itchy must be scratched. ;)
-Derek
Comment #6
moshe weitzman CreditAttribution: moshe weitzman commentedgood idea. feel free to roll the patch ... this is all slated to change soon with Notifications integration but not with the upcoming release so i'd commit before then if a patch shows up.
Comment #7
moshe weitzman CreditAttribution: moshe weitzman commentedFYI, the choices are not @body and @teaser. they are @node_full or @node_teaser.
Comment #8
dwwAnd do what with the existing '@body'?
Comment #9
DevElCuy CreditAttribution: DevElCuy commentedSorry to bother here, I just want to suggest switching from OG build-in notifications to subscriptions_og, it is almost done (just waiting for feedback if there is some bug), is an add-on for subscriptions module, which uses Mail Editor templates.
Take a look at: http://drupal.org/project/subscriptions_og and http://api.drupal-contrib.org/api/subscriptions_og
Blessings!
Comment #10
jondblackburn CreditAttribution: jondblackburn commentedWhat is the status of this issue . . .
1. Was OG ever updated to include this feature? (If so, what is the release name, and how stable is it?)
2. Is og_subscriptions replacing this functionality, as a whole? (It seems so, just looking for clarification...)
3. lastly, is any of this going to change w/ new version of og (someone mentioned integration w/ notifications module), or is this the final situation?
'bout to take a shot at this (will probably try og_subscriptions), but wanted to get the final verdict (if there was one).
Comment #11
moshe weitzman CreditAttribution: moshe weitzman commented@dww - ideally, we have an update function which replaces it with @node_teaser.
@jobdblackburn - the issue status is 'active'. that means that nothing has been committed. there is not even a patch pending.
Comment #12
dwwI cleaned up the mess in aisle og_node_view(). It now takes a $teaser argument (like it sort of thought it did, but didn't until now). I ripped out some cruft in there, too. There are now '@node_teaser' and '@node_body' values for the new node email settings. I added a DB update to convert the existing variables (which I numbered according to the branch-aware hook_update_N numbering scheme: http://api.drupal.org/api/function/hook_update_N).
Light testing indicates this is working as expected, though I'm a little worried about my change to invoke hook_view() or hook_nodeapi('view') with the $page argument set to TRUE. However, that seems more correct -- this is for how things should "look" when viewing the stand-alone version of the node, not as part of a listing on another page, right?
Sorry the patch is huge, but I had to fix the help text descriptions in a few places, too, and those are giant single-line FAPI arrays, instead of the usual each-attribute-on-its-own-line style....
Comment #13
dwwBased on some initial feedback from Moshe in IRC, new patch:
- uses '@node_full' instead of '@node_body'.
- uses str_replace() instead of strtr() in the DB update.
- cleans up a comment that was a little too terse to make sense.
Comment #14
moshe weitzman CreditAttribution: moshe weitzman commentedCommitted. I had to fix comment notifications which had empty bodies because we were not setting @node_teaser for comments. we really need to separate the comment part of og_mail form the node part and probably give them different mail templates.
Comment #15
dwwYeah, comments are whacky, sorry I forgot about those. :( Comments don't have teasers, and they're not full nodes, so the new variables don't make any sense. Whoops. ;) Should we just start a new issue about this?
Comment #16
halfiranian CreditAttribution: halfiranian commentedThis looks really helpful, thanks for doing this.
Comment #17
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.