New BuddyPress / bbPress plugin: Group Forum Subscription

BuddyPress and bbPress can be plugged into each other such that BuddyPress groups get their own discussion forums, which are powered by bbPress. Adding Burt Adsit’s bpGroups means that private and hidden groups can have their discussion forums private too. But a major hurdle is email notification: Certain kinds of BP communities simply won’t get rolling if there’s no easy way for users to get email notification of new discussions. There are solutions out there to assuage this problem within bbPress (notably Thomas Klaiber’s Post Notification, which served as the inspiration for the mechanics of my own plugin), but email notification remains hidden in bbPress favorites, instead of in an out-front toggle.

Group forum notification is coming in a future version of BuddyPress, but it’s important enough that I needed it now.

This set of plugins, called Group Forum Subscription, fixes that. Features:

  • Users can subscribe to individual discussion topics from within BuddyPress
  • Users can subscribe to topics on a group-by-group basis – that is, one can subscribe to all existing and future topics associated with a particular BuddyPress group
  • Users are automatically unsubscribed from a group’s discussions when they leave the group
  • Administrators can subscribe all users to the appropriate forums with a single click (potentially handy for first-time setup
  • Administrators can toggle whether email notification is turned on by default.
  • Administrators can determine whether the topic links in the notification emails will point to bbPress or to the BuddyPress forum interface

Installation instructions

  1. Download the package
  2. Upload the BuddyPress plugin bp-group-forum-subscription.php to the plugins directory of your main WPMU blog and activate it
  3. If you prefer for the members of your community to use the BuddyPress posting interface for discussions, add the following hook: [sourcecode language=”php”][/sourcecode] immediately after [sourcecode language=”php”]
    [/sourcecode] in /[your bp theme dir]/groups/forums/topic.php
  4. If you plan for your users to use bbPress for forum reading and posting, upload the bbPress trigger plugin bb-group-forum-subscription.php to [bbpress-install-dir]/my-plugins/ and activate it through the bbPress admin screen. Please note: the bbPress plugin changes the (IMO somewhat opaque) “Add to favorites” link on each topic page to a more straightforward Subscribe/Unsubscribe. If you like this change, open up [bbPress-theme-dir]/topic.php, and change
    [sourcecode language=”php”]user_favorites_link();[/sourcecode]
    to
    [sourcecode language=”php”]user_favorites_link( array(‘mid’ => __(‘Subscribe to this discussion’)),array(‘mid’ => __(‘Unsubscribe from this discussion’)));[/sourcecode]

You can configure the plugin on the admin page (Group Forum Subscription under Dashboard Settings. Members of your BP community can tinker with their subscriptions either on the individual topic pages (in bp or bbpress) or on their BP Settings > Notification page (where they can subscribe/unsubscribe to entire groups).

I’m in the process of setting up BuddyPress 1.1, which was just released today. Once I’ve got a dev instance of it up and running, I will do the necessary fixes to make the plugin run on the new version. (I don’t think it will be too hard, given the number of craptastic workarounds I had to do in this version because of the absence of all the nice 1.1 hooks.) Stay tuned.

10 thoughts on “New BuddyPress / bbPress plugin: Group Forum Subscription

  1. Pingback: New BuddyPress / bbPress plugin: Group Forum Subscription – CUNY Academic Commons Development Blog

  2. Boone Post author

    Hi Jim. I originally wrote the code for 1.0.3, and only afterward retrofitted it for 1.1. I have not done super extensive testing to make sure that it still works with 1.0.3, but it should. I’m running it on the production version of the Academic Commons, which is running 1.0.3, so I hope it works, anyway 🙂

  3. Ray

    Hey Boone,

    The bbPress instructions listed in this post wasn’t in the readme.txt of the plugin package.

    PS. I like what you did over at the CUNY BP site – how you are redirecting BP group forum posts to their bbPress equivalents.

    I’ve copied your method on a test BP < 1.1 install and it works beautifully! I can't believe I didn't think of this method before! (I did have to hack some core files to do this though!)

  4. Boone Post author

    Hi Ray,

    Thanks for the comments. Yeah, I think I deleted the bbPress instructions from the plugin package when I went to 1.0, but I should put them back.

    I have been meaning to write up the process by which I redirected BuddyPress forum traffic over to bbPress, but I got lazy and didn’t do it. Glad you figured it out on your own! I remember it took some weird hacks to fix all the links. I should really write about it one of these days, before the knowledge leaves my head forever.

  5. Boone Post author

    Har har har, thanks Ray. I’ve been having issues with Akismet and my server config today. Sorry if I have bespoiled your feeds.

  6. AntonRSA

    I’ve been using your plugin for a couple of weeks now and found this problem.

    Once a user is subscribed to the forum post and they click on unsubscribe, if someone creates a new forum topic, they are subscribed again. If they go to notifications and switch off the notifications for the specific group, it doesn’t help. As soon as a new forum topic is started they get the mail of the forum and they are subscribed.

    Anyway to fix this?

  7. Pingback: Teleogistic / Group Announcements tab in BuddyPress

Comments are closed.