Group Forum Subscription v1.3

I’ve just put version 1.3 of Group Forum Subscription into the WordPress plugin repository. Lots of cool stuff has been fixed, added, or improved:

  • 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)

I got a TON of help from some readers of this blog, who were diligent about bug reports and extremely generous with their translations. Thanks so much for your help!

Displaying the BuddyPress admin bar in other applications

By popular demand, here’s the method we used at the CUNY Academic Commons to get the BuddyPress admin bar to appear on the non-WP/BP portions of our site. In our case, that means MediaWiki and bbPress, but theoretically this method could work for any kind of software out there.

I should note that I did not devise this method. It was invented by the inimitable Zach and Lucas of Cast Iron Coding.

The concept is as follows. A bit of jQuery looks for a div of a certain ID on a page and, when it finds it, opens a dummy WP page that contains essentially nothing but the BP admin bar loader, which then appears on your page. Download the zip file containing the necessary files (admin-bar-integration) and follow these steps to make it happen.

  1. Upload the file page-component.php to your WP theme directory.
  2. Create a new page in WordPress. The page should be blank. In the Attributes box, select the Template called “Component (do not use)”. Name the page bpnavslug and publish it, making sure that you take note of the permalink. You’ll need that URL (relative to your site’s webroot) in step 4.
  3. If any part of your site creates a menu or a list of your WordPress pages, you’ll want to exclude this empty page from those listings. Find the function call wp_list_pages in your theme (often in header.php or index.php) and add an exclude argument. For example, if the page number of bpnavslug is 4, make sure all references to wp_list_pages read wp_list_pages('exclude=4').
  4. Open the file bp-bar-integration.js. On line 3, you’ll see the path /bpnavslug/. Replace it with the path to the bpnavslug post you created in step 2.
  5. Upload bp-bar-integration.js to your server. For the sake of argument, I’ll put mine at /wp-content/js/bp-bar-integration.js.
  6. Now let’s turn to the application where you want the admin bar to appear. Open the theme file that contains the </body> tag. In bbPress, for example, this is usually footer.php.
  7. Immediately before the body close tag, paste the following code:
    <div id="bpContainer">
    </div>
  8. Next, open the template file that contains the document head (header.php in bbPress, for instance). Make sure that jQuery is also called somewhere in the head. If it’s not, the following code will call up jQuery on a standard installation of WP:
    <script type='text/javascript' src='/wp-includes/js/jquery/jquery.js?ver=1.3.2'></script>
    Now paste the following line somewhere in the head (make sure it comes after the call to jQuery):
    <script type="text/javascript" src="/wp-content/js/bp-bar-integration.js"></script>
    Be sure to replace the src attribute with path from your upload in step 5.
    Finally, you’ll have to include the CSS for the admin bar. On a default installation of BuddyPress 1.0.3 or less, the following code will work:
    <link rel='stylesheet' id='bp-admin-bar-css' href='/wp-content/plugins/buddypress/bp-core/css/admin-bar.css' type='text/css' media='screen' />
    On a more recent version of BP (1.1+), the admin bar stylesheet has been rolled in with the rest of the styles. Either create your own stylesheet containing just the admin bar code, or import the entire stylesheet:
    <link rel='stylesheet' id='bp-admin-bar-css' href='/wp-content/themes/bp-default/style.css' type='text/css' media='screen' />

A note: This method appears to be incompatible with the Google Analytics WP plugin (which appends Google’s JS to the footer of every WP page, and thus into bpnavslug, and ends up gumming up the works). You could probably get around this with some creative if-statements in the GA plugin itself.

Good luck. Because of the diversity of people’s setups, I can’t guarantee that this method will work for everyone, nor can I provide support to everyone who tries it. But I do encourage you to post whether you’ve been successful in the comments, and to help each other figure things out.

Translate Group Forum Subscription for BuddyPress

With a lot of help from users, Group Forum Subscription is becoming pretty stable (and widely used!). I’ll be releasing the next version 1.3 within the next few days, and one of the new features is localization. If you’re using the plugin for a site in a language other than English, I encourage you to have a go at creating a translation and, if you’d like, providing it to me for release with future versions.

Never translated a WordPress plugin before? Neither had I, until the other day when I put my rusty French to work on this plugin. The process is quite easy. There are two ways to do it:

  1. If you think you’ll find yourself translating often, I encourage you to follow the instructions at http://urbangiraffe.com/articles/translating-wordpress-themes-and-plugins/. The program PoEdit that the author recommends is (once you get it installed) very, very easy to use, and it remembers your translations of commons words and phrases for future use. If you take this route, please send both the .po and the .mo files to me or to cunycommons@gmail.com, and don’t forget to include your name in the email, blog comment, or .po metadata, so that you receive credit for your work. Make sure you use the trunk version of the plugin, available at http://svn.wp-plugins.org/group-forum-subscription-for-buddypress/trunk/, as the stable version does not contain the localization code.
  2. If you’d rather not install a program, you can download my French translation group-forum-subscription-fr_FR and edit it in a plain-text editor (like Notepad or TextEdit – not Word!). The lines beginning “msgid” are the original English. The lines beginning “msgstr” are the translations. Replace the French translations with translations in your language and post/send the file to me.

Thanks for your help!

Group Forum Subscription v1.1

If you’re using Group Forum Subscription for BuddyPress, you might like to know that I’ve just pushed out v1.1. There’s nothing new in terms of functionality, but a lot of small bugs have been fixed, as well as a fairly large bug that was affecting automatic subscription on the joining/leaving of BP groups. Download the latest version through your WP Plugins panel, or download it from wordpress.org.

Thanks to r-a-y, MarkS, WestPointer, and other users for helping me to spot and squash those bugs!

New BuddyPress / bbPress plugin: Group Forum Subscription

BuddyPress and bbPress connect nicely, giving BuddyPress groups a handsome forum interface, but the software has no native ability to allow users to receive email when their favorite discussions are updated. Without this functionality, it can be hard for users to keep up-to-date with forums, and subsequently the forums are less active than they otherwise could be.

Subscription panel on group home page
A panel on each group home page lets users know whether they'll automatically receive email notifications of new discussion activity in the group

Group Forum Subscription is a set of plugins I’ve written (mostly on the BuddyPress side, with a small bbPress trigger plugin) that adds the missing forum notification functionality. GFS allows members of BuddyPress communities to subscribe to email notifications of new discussion activity. Subscriptions can be managed on a topic-by-topic or group-by-group basis.

Users can subscribe or unsubscribe from entire groups on the Notification Settings page
Users can subscribe or unsubscribe from entire groups on the Notification Settings page

The plugin also has some administrative settings. Notable among these is the ability to set up email notifications for the first time after the plugin is installed, so that users are automatically subscribed to topics in their groups without having to set it up manually. This is a setup process that we’ll be running in the upcoming days here on the CUNY Academic Commons.

Group Forum Subscription will currently work only on 1.0.x versions of BuddyPress – the brand-new BP 1.1 is not yet supported. I’ll be working on the upgrade very soon. Read more about the guts of the plugin or download it for yourself.

New BuddyPress plugin: Enhanced BuddyPress Widgets

BuddyPress comes with several WordPress widgets, among which are the Groups and Members widgets that you see on the CUNY Academic Commons home page. This plugin makes those widgets a little more customizable, allowing users to specify which of the three tabs (Newest, Active, or Popular) they’d like to be each widget’s default view.

enhanced-bp-widget

If you’ve got a blog on the CUNY Academic Commons, you can start using this feature right away. Just look in Dashboard > Appearance > Widgets. Be sure to select the Groups/Members widgets whose descriptions say “Enhanced”.

You can download the plugin for use on your own installation of WPMU/BP here: enhanced-buddypress-widgets. It’s also available from the WordPress plugin database: http://wordpress.org/extend/plugins/enhanced-buddypress-widgets/.

Version 0.2 of BuddyPressActivity

Since releasing my MediaWiki extension BuddyPressActivity, which puts wiki edits into your BuddyPress activity stream, I’ve noticed a bug or two. In particular, the cool feature that filters out multiple edits of a page by a given author within a 24 hour period wasn’t working right. I’ve made the necessary fixes in v0.2.

Get the updated code today.

New BuddyPress plugin: Remove Previous Comment Edits From BuddyPress Activity

UPDATE: BP Dev Andy writes in a comment to this post that this bug will be fixed in BP core soon. If you’re running a recent version of BP, it’s likely that you won’t need this plugin. Please make sure you can reproduce the issue before installing.

This plugin fixes a small but potentially annoying quirk in BuddyPress. If you, as a blog owner, edit a comment that appears on your blog, BuddyPress adds an entry to the sitewide and individual activity streams – but it doesn’t delete the old entries. As a result, if you end up (for example) editing your own comment a few times in a row, you’ll see multiple items on the activity feed.

This plugin fixes the problem by checking whether a submitted comment is an edit, and if it is, by deleting previous versions of the comment in the activity stream.

Until the plugin is in the WordPress repository, I’ve made it available in a zip file here. Just load bp-activity-skip-comment-edits.php into your /wp-content/plugins folder, activate in Dashboard > Plugins (sitewide, if you’d like), and you should be good to go.

New MediaWiki extension: BuddyPressActivity

One of the most interesting vantage points from which to monitor goings-on around the CUNY Academic Commons is the BuddyPress activity feed. The sitewide feed – located on the Commons’s News page – lists all the activity happening the blogs, groups, and profiles around the site. There are activity streams for individual users and for those users’ friends as well – you can mine, for instance, here.

wiki-activity

Until recently, though, these streams did not include information the activity taking place in the wiki portion of the site. I’ve developed a extension for MediaWiki (the software that powers the Wiki section of the Commons) called BuddyPressActivity that rectifies this shortcoming. For websites – like the CUNY Academic Commons – that have integrated our homegrown MediaWiki/Wordpress MU integration, this extension will update BuddyPress activity streams to include edits to pages within the wiki, thus better reflecting the extent and variety of the action on the site.

You can find out more about the extension – and download the code for use on your own MW/WMPu installation – at http://www.mediawiki.org/wiki/Extension:BuddyPressActivity.

Updated version (0.2) of Custom Profile Filters for BuddyPress

I’m releasing a new version of my Custom Profile Filters for BuddyPress plugin. The initial version, described here, gave BuddyPress users more control over which terms in their profiles become linked to a community-wide profile search. The new version gives BP administrators the ability to tweak these links even more. Here’s what’s new:

  1. Some profile information – phone numbers, IM handles, and so on – is unique to the individual user. Thus there’s no real need to have this information linked to a community-wide search. Using this plugin, administrators can specify certain profile fields that will remain non-linked. By default, profile fields called Skype ID, Phone, and IM will not be processed as links, but you can tweak this to be whichever fields you want. See readme.txt and custom-profile-filters-for-buddypress.php for more information.
  2. Other fields, especially those social networking sites where each user’s handle is attached to a profile page, can be more usefully linked to those user profiles than to a search of the community. For example, it makes more sense for the contents of the Twitter field to link to an individual’s Twitter page rather than to other users in the community who have the same Twitter handle (hopefully no one!). With this plugin, administrators can specify that certain fields will turn the user’s social networking ID into a profile link. By default, the plugin recognizes fields called Twitter, Delicious ID, YouTube ID, Flickr ID, and FriendFeed ID. See custom-profile-filters-for-buddypress.php for more information and to change these settings.

I also added a little bit of code to make sure that BuddyPress can recognize email addresses with periods before the @-sign.

You can see some of these things at work in my profile here on the CUNY Academic Commons: https://commons.gc.cuny.edu/members/boonebgorges. You’ll notice that the Twitter field shows a link to my Twitter profile, even though I just entered my handle in the Edit Profile screen.

Grab the latest version from the trunk http://svn.wp-plugins.org/custom-profile-filters-for-buddypress/ or download it here: custom-profile-filters-for-buddypress-v02.zip