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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wallan’s picture

Version: 4.7.x-1.x-dev » 5.x-1.x-dev

I'd like to second that request!

Thanks,

Allan

Navinjohnson’s picture

I will third that request!

moshe weitzman’s picture

ok, thats enough :). if someone cares to work on this, i suggest we just reuse the preference that admin has set for rss feeds.

m3avrck’s picture

I 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.

dww’s picture

Version: 5.x-1.x-dev » 5.x-5.4
Assigned: Unassigned » dww

This 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

moshe weitzman’s picture

good 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.

moshe weitzman’s picture

FYI, the choices are not @body and @teaser. they are @node_full or @node_teaser.

dww’s picture

And do what with the existing '@body'?

DevElCuy’s picture

Sorry 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!

jondblackburn’s picture

What 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).

moshe weitzman’s picture

@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.

dww’s picture

Status: Active » Needs review
FileSize
8.51 KB

I 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....

dww’s picture

Based 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.

moshe weitzman’s picture

Status: Needs review » Fixed

Committed. 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.

dww’s picture

Yeah, 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?

halfiranian’s picture

This looks really helpful, thanks for doing this.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.