BuddyPress Groups
-
My site is under development and I’m using BuddyPress Groups. What will happen if I try to use this plugin with BuddyPress Groups?
-
Hi Jimmy,
I haven’t tested it with BuddyPress Groups, nor am I technically familiar with them. Do they show up as roles once created? If they do, then it should work fine.
It works! You, sir, are a genius.
My next question is: Can this plugin notify everyone in the forum *except* the person that replied on the thread? Basically, if I reply on the thread, I don’t want an email telling me that I replied.Thanks! It’s good to know that it works with BuddyPress :).
Re skipping the author for notification, you can hook into a filter to achieve that. The code that calls the filter is:
$recipients = apply_filters( 'bbpress_topic_notify_recipients', $recipients, $topic_id, $forum_id );So you can hook into that filter, check the author_id from $topic_id, remove the author from $recipients (it’s an associative array of ID => WP_User object), and finally return the filtered array.
Cheers,
VinnyVinny, if I try that, I will break the entire website!
Thanks for all your help, seriously.Jimmy, try placing this in your
functions.phpfile. Note that I have not tested it, so be prepared to remove it via FTP if you added it via the Editor UI.function bbpnns_remove_topic_author( $recipients, $topic_id, $forum_id ) { $author_id = bbp_get_topic_author_id( $topic_id ); unset( $recipients[$author_id] ); return $recipients; } add_filter( 'bbpress_topic_notify_recipients', 'bbpnns_remove_topic_author', 10, 3 ); function bbpnns_remove_reply_author( $recipients, $reply_id, $topic_id, $forum_id ) { $author_id = bbp_get_reply_author_id( $reply_id ); unset( $recipients[$author_id] ); return $recipients; } add_filter( 'bbpress_reply_notify_recipients', 'bbpnns_remove_reply_author', 10, 4 );That broke the website. “Error 500.” This PHP business is way beyond me, amigo. I noticed, however, that all the other functions in the functions.php file end with a } not a semicolon. I was able to remove the extra code and the website works again, btw.
Please make sure you copied/pasted the code exactly as shown, and before the ending
?>tag (if there’s one, it’s OK if there is none and the end of the file).I tested the snippet for compile errors and it compiles just fine. Also check your error logs to see what exactly is the error that was thrown to generate the 500. It should explain exactly what went wrong.
The snippet above doesn’t have any function ending in semi-colon. What you have is a function, and a call to
add_filter()– twice.I can’t get it to work. I tried putting the code in multiple locations of two different functions.php files (one in the Divi theme folder, one in wp-includes folder). I don’t know how to check error logs. Basically, I have no business tinkering with anything but a CSS file. Thanks for all your help.
I’ll look into adding the functionality to the plugin some time in the future.
Removing the author from the notification list was implemented in version 1.9.4.
I looked further into BuddyPress Groups and Forum Groups and built a premium bridge plugin. It also plays nicely with my other Premium add-ons (Digests and Opt-Out).
You can find it here: http://usestrict.net/product/bbpress-notify-no-spam-buddypress-bridge/
The topic ‘BuddyPress Groups’ is closed to new replies.