Tag Archives: groups

Group Announcements tab in BuddyPress

Cross-posted at the CUNY Academic Commons Development blog

I had a request or two to explain how I built the Group Announcements feature on the CUNY Academic Commons. Here goes.

Brief background: When the Commons was upgraded to BuddyPress 1.2, we got the benefit of interactive activity streams everywhere, including groups. This caused some confusion, however, as users were uncertain where conversation best fit into the Commons’s architecture: in the Forums (where it had been traditionally), or in the activity stream. In some communities this kind of fracturing might be okay or even welcome, but in ours it was confusing. At the same time, we wanted a way for group admins and mods to send important notices to the members of their groups. By taking the group activity updates and repurposing it as a Group Announcements section, I was able to kill two birds with one stone: providing an announcement space for mods, while focusing extended discussion in the forums.

You can download the CAC Group Announcements plugin here.

I’m not putting this in the repo at the moment because I don’t want to build a proper admin UI and support it :) For that reason, here is a primer on how the plugin works – if you want to customize or maintain it, you’re on your own, buster.

  1. The CAC_Group_Announcements class is an instance of the BuddyPress Group Extension API. It is responsible for creating the Announcements tab markup and adding it to the nav. You’ll notice that the majority of the markup is created by including bp-default’s activity-loop.php and post-form.php templates. You could customize this more if you wanted.
  2. bp_is_group_announcements() is a little template tag that can be used to test whether you’re looking at a group announcements page. This is needed for the activity filter, in step 3.
  3. cac_set_announcement_filter() adds a filter to the bp_has_activities query string when you are looking at an announcements page, so that it only displays activity items of the type activity_update. In other words, when you are looking at the regular activity stream for the group, you see all of the associated group activity items (new members, forum posts, etc) but when you’re on the announcements page you only see activity updates (which, remember, have been repurposed as announcements).

As I look at the code, I see that there are things I would definitely change if I were going to make this into a distributed plugin. If you want to make those changes, be my guest. You’re welcome to help each other in the comment section, but I won’t be formally supporting this, as it is a very basic hack that should happen at the theme level anyway. Good luck!

New BuddyPress plugin: BP Group Reviews

I’m working on a project that needs to allow users to leave reviews of groups, kinda like buddypress.org does with plugins. So, with Andy’s permission, I cleaned up, packaged, and extended his code into a new plugin, BP Group Reviews. It allows users to leave a star rating and a text review of any group on your BuddyPress installation.

BP Group Reviews

BP Group Reviews adds a new tab to your BuddyPress groups, where users can leave reviews and star ratings for the group.

The guts of the plugin were written by Andy Peatling for use on the Extend section of buddypress.org. I adapted and expanded the code into this plugin, and I’ll be maintaining it. All praise goes to Andy, all blame for things broken goes to Boone :)

Follow the plugin’s development at http://github.com/boonebgorges/bp-group-reviews

Instructions

  1. Upload the bp-group-reviews directory to your WP plugins folder and activate

Download the plugin here.

BP Group Reviews has been downloaded 5,356 times. Are you using this plugin? Consider a donation.

Version history

1.0 – November 17, 2010
Initial release

1.0.1 – November 19, 2010
Loads ratings metadata into the groups loop for better performance
Missing gettext calls fixed

1.0.2 – November 20, 2010
Missing gettext calls fixed
Typo fixed (props Luca Camellini)
Italian translation added (props Luca Camellini)

New BuddyPress plugin: BuddyPress Group Email Subscription

Email Options on settings page

Email Options on settings page

I’m quite happy to announce the release of a more-or-less stable (we hope!) version of BuddyPress Group Email Subscription, a BuddyPress plugin that allows for fine-grained, user-controllable email subscription to group content in BuddyPress.

This plugin is different from some of my others in that it was truly a group endeavor. The base of the plugin was written by David Cartwright, with a little bit of code from me. A nearly complete rewrite of the front-end and most of the guts of the plugin was undertaken by Deryk Wenaus. I wrote the daily and weekly digest functionality, along with some of the settings pages and various bugfixes throughout. The current codebase of the plugin is probably 60% Deryk, 30% me, and 10% David.

It was my first time working on a truly collaborative software development project like this, and it was a real pleasure working with both of these gentlemen. Thanks, guys.

Get BuddyPress Group Email Subscription here.

BuddyPress Group Email Subscription

Email Options on settings page

Email Options on settings page

Authors: Deryk Wenaus, Boone Gorges, David Cartwright

BuddyPress Group Email Subscription allows group members to receive email notifications for all types of group activity, especially forum posts. Each user can choose how they want to subscribe to the group.

EMAIL SUBSCRIPTION LEVELS: There are 5 levels of email subscription options:

  1. No Email – Read this group on the web
  2. Weekly Summary Email – A summary of new topics each week
  3. Daily Digest Email – All the day’s activity bundled into a single email
  4. New Topics Email – Send new topics as they arrive (but don’t send replies)
  5. All Email – Send all group activity as it arrives

DEFAULT SUBSCRIPTION STATUS: Group admins can choose one of the 5 subscription levels as a default that gets applied when new members join.

DIGEST AND SUMMARY EMAILS: The daily digest email is sent every morning and contains all the emails from all the groups a user is subscribed to. The digest begins with a helpful topic summary. The weekly summary email contains just the topic titles from the past week. Summary and digest timing can be configured in the back end.

EMAILS FOR TOPICS I’VE STARTED OR COMMENTED ON: Users receive email notifications when someone replies to a topic they create or comment on (similar to Facebook). This happens whether they are subscribed or not. Users can control this behaviour in their notifications page.

Email options on group pages

Email options on group pages

TOPIC FOLLOW AND MUTE: Users who are not fully subscribed to a group (ie. maybe they are on digest) can choose to get immediate email updates for specific topic threads. Any subsequent replies to that thread will be emailed to them. In an opposite way, users who are fully subscribed to a group but want to stop getting emails from a specific (perhaps annoying) thread can choose to mute that topic.

ADMIN NOTIFICATION: Group admins can send out an email to all group members from the group’s admin section. The email will be sent to all group members regardless of subscription status. This feature is helpful to quickly communicate to the whole group, but it should be used with caution.

SPAM PROTECTION: To protect against spam, you can set a minimum number of days users need to be registered before their group activity will be emailed to other users. This feature is off by default, but can be enabled in the admin.

The plugin is fully internationalized.

NOTE TO PLUGIN AUTHORS: If your plugin posts updates to the standard BuddyPress activity stream, then group members who are subscribed via 3. Daily Digest and 5. All Email will get your updates automatically. However people subscribed as 2. Weekly Summary and 4. New Topic will not. If you feel some of your plugin’s updates are very important and want to make sure all subscribed members them, then you can filter ‘ass_this_activity_is_important’ and return TRUE when $type matches your activity. See the ass_this_activity_is_important() function in bp-activity-subscription-functions.php for code you can copy and use. An example: adding a new wiki page would be considered important and should be filtered in, whereas a comment on a wiki page would be less important and should not be hooked in.

BuddyPress Group Email Subscription has been downloaded 72,987 times. Are you using this plugin? Consider a donation.

Version history

2.3 – May 12, 2010
Initial release

Group Forum Subscription for BuddyPress

This plugin allows users to subscribe to email notifications of forum activity in their BuddyPress groups.

Use of this plugin for versions of BuddyPress 1.2 and higher is not recommended. New plugins, such as Group Activity Notifications, are more general (encompassing all group activity instead of just forums) and are built with BP 1.2 in mind. I encourage you to use that plugin instead, as this plugin will not be officially supported for new versions of BuddyPress.

Download the plugin here.

Group Forum Subscription for BuddyPress has been downloaded 7,704 times. Are you using this plugin? Consider a donation.

Other posts about this plugin can be found here, here, here, here, here, and here.

Version history

0.1
Initial release
0.2
Bug fixes
1.0
Compatibility with BP 1.1
Bug fixes
1.1
Quite a few bug fixes, especially with BP 1.1 compatibility
1.2
Post reply bugfix for IE
Updated readme information for installation with older versions of BP
Resolved issues some users were having with PHP errors
Moved stable tag away from trunk. Use trunk at your own risk!
1.3
Localization complete. Shipped with four translations: French, German, Russian, Spanish
Dashboard menu moved under BuddyPress section
Forum Subscription notification block added to BP’s forum index.php pages
Forum subscription notification block removed for non-logged-in users
Fixed bug that subscribed non-confirmed users to forums created in standalone bbPress
Admins can choose whether posters receive notifications of their own posts (off by default; not togglable in standalone bbPress)
1.4
Fixed bug that prevented members of large groups from being subscribed to new topics
Fixed bug that kept email headers/footers from being translated
Fixed bug that kept subscribing banned members in bbPress standalone
Fixed bug that didn’t check to see if members wanted automatic subscription for a given group in bbPress standalone
Added topic title to bbPress standalone email
Fixed bug that kept admin_menu from hooking correctly for some users installing BP in non-standard location
1.4.1 – March 27, 2010
Loader file added to prevent crashes when BP is upgraded
Duplicate notifications menu functions removed to ensure interoperability with BP 1.2 bp-default

New BuddyPress plugin: BP Group Management

Another day, another plugin for BuddyPress. In BP < 1.2, it was impossible for site admins to manage group membership in groups where they weren't also the local admin. This is good in a lot of situations, but in some applications of BP it can be a pain - the system administrator needs more power in order to correct problem, wreak havoc, and so on. In BP 1.2+ the situation is better - admins can manage groups more - but it's still not all that easy to see everything in one place. This plugin rectifies the situation by allowing site admins to manage the members of groups across their BP installation from a single screen.

Read more about it.

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:
    <?php do_action( 'groups_forum_topic_custom_content' ); ?>

    immediately after

    <div class="info-group">

    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
    user_favorites_link();

    to

    user_favorites_link( array('mid' => __('Subscribe to this discussion')),array('mid' => __('Unsubscribe from this discussion')));

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.