buddypress-group-email-subscription icon indicating copy to clipboard operation
buddypress-group-email-subscription copied to clipboard

HTML templating, WP Better email plugin and Subscription digest

Open pierre-dickinson opened this issue 10 years ago • 8 comments

Hi Boone, Is it possible to override HTML subscription digest and integrate it in the WP Better emails plugin's template? Do i have to modify the function 'ass_send_multipart_email()' in bp-activity-subscription-digest.php ?

If not, how can i hook the function 'ass_digest_format_item()' to use my own responsive html template?

Thanks for your answer.

pierre-dickinson avatar Dec 10 '14 11:12 pierre-dickinson

@r-a-y You have any ideas on how this might be easily done?

On 12/10/14 06:22, Pierre Dickinson wrote:

Hi Boone, Is it possible to override HTML subscription digest and integrate it in the WP Better emails plugin's template? Do i have to modify the function 'ass_send_multipart_email()' in bp-activity-subscription-digest.php ?

If not, how can i hook the function 'ass_digest_format_item()' to use my own responsive html template?

Thanks for your answer.

— Reply to this email directly or view it on GitHub https://github.com/boonebgorges/buddypress-group-email-subscription/issues/65.

boonebgorges avatar Dec 10 '14 19:12 boonebgorges

@dwenaus did some work on this.

Check out this commit - https://github.com/boonebgorges/buddypress-group-email-subscription/commit/e022554106cf6bcd7e34103690d562bb8a4e768a.

He also provided a code snippet so you can use WP Better Emails: https://gist.github.com/dwenaus/8762785

I haven't tested the code snippet, so @mecanographik give that a shot and see if that works for you.

r-a-y avatar Dec 10 '14 19:12 r-a-y

Hi, thanks for the snippet, i've been working around with it but it doesnt work. I can't figure out how to disable the html formating ;-( it's really important to manage the way transactionnal emails are branded on professionnal social networks... Wp better emails is a great plugin but it can't manage your formating. Please have a try with the snippet

pierre-dickinson avatar Dec 11 '14 19:12 pierre-dickinson

Did you paste the code snippet in /wp-content/plugins/bp-custom.php?

Here's a guide on bp-custom.php if you're not sure how to use it: https://codex.buddypress.org/themes/bp-custom-php/

r-a-y avatar Dec 11 '14 19:12 r-a-y

Nope, it was placed it in my functions.php theme file. I'll test it in bp-custom.php Thanks for your comment.

pierre-dickinson avatar Dec 11 '14 21:12 pierre-dickinson

hmm i've placed the code in my bp-custom.php but it doesn't change anything. Thanks @r-a-y @dwenaus @boonebgorges but i'll have to try something else!

pierre-dickinson avatar Dec 12 '14 15:12 pierre-dickinson

Thanks for plugging away, Pierre. Better support for WP Better Emails is something we're interested in too, so we'll continue to work on this over time.

On 12/12/2014 10:12 AM, Pierre Dickinson wrote:

hmm i've placed the code in my bp-custom.php but it doesn't change anything. Thanks @r-a-y https://github.com/r-a-y @dwenaus https://github.com/dwenaus @boonebgorges https://github.com/boonebgorges but i'll have to try something else!

— Reply to this email directly or view it on GitHub https://github.com/boonebgorges/buddypress-group-email-subscription/issues/65#issuecomment-66784482.

boonebgorges avatar Dec 12 '14 15:12 boonebgorges

Hi, i thought it would be interesting to work out with a filter on this function : ass_send_multipart_email() I'm sure you could easily add a a hookable location for this action (do_action) in the next release ;-) Maybe, the solution is to hook the function to modifiy the array value contained in the string '$headers' ... the reason, why the daily and weekly digests are not wrapped by the WP Better Emails template, while the "All Activity" Reports are. It's because the daily and weekly mails content type is set as HTML '$headers = array( 'Content-type: text/html' ); '

I found this in 2 files bp-activity-subscription-digest.php and bp-activity-subscription-functions.php

When you change that into text/plain - the wp better emails plugin works also with daily and weekly digests (...) See this topic here : https://wordpress.org/support/topic/digest-emails-not-sent-in-wp-better-email-template?replies=5#post-7101481

regards,

pierre-dickinson avatar Jun 23 '15 12:06 pierre-dickinson