Archive for the ‘BuddyPress’ category

My Groups widget for BuddyPress

March 19th, 2010

I had a client request a modification of the “Groups” widget for BuddyPress.  Instead, it should be limited to the groups for the logged in user.  And so, I give you the “My Groups” widget.  It will display all the groups for the user alphabetially sorted.  Cheers.

Download:
bp-my-groups-widget.php (zip)

Buddypress Group Invite by Email

March 17th, 2010

Here’s another small plugin I wrote: Group Invite By Email.  Basically, it adds an email field to the bottom of the usual “send-invites” screen.  Then, when you click “send invites” it sends the person a nice little email explaining they’ve been invited to your group, and giving them a link to register on your site.

Once they complete the registration, it automatically adds them to the group.  It does this by checking their email address against a list of outstanding invites.  This removes the extra hassle of needing to invite them to the group after you’ve gotten them to sign up, and them needing to approve your group invitation.

In the future, this functionality will likely be bundled with another plugin already existing: Invite Anyone. That plugin allows you to invite non-friends to your group; this one allows you to invite non-members.

Here it is:
buddypress-group-invite-email (.zip)

Buddypress Default Forum Topic

March 14th, 2010

This plugin I wrote that creates a default topic for each group forum in BuddyPress.  Please note, you have to open up the PHP file, and replace the values for the default title and text with what you would like to use.  Even if you are unfamiliar with PHP, this should be very straightforward.

To Install:
-Extract and upload the files to your wp-content/plugins/ folder.
-Go to the “Plugins” screen on the admin dashboard, and activate the plugin
-Enjoy.

Here it is:
default-forum-topic (.zip)

Buddypress Group Document Store

December 24th, 2009

I just uploaded my largest wordpress plugin yet: Buddypress Group Documents!

Group Documents creates a page within each BuddyPress group to upload and store documents.  Documents can be edited and deleted either by the owner or by the group administrator.  Document activity is logged in the main activity stream, and is also tied to the user and group activity streams.  The site administrator can set filters on file extensions, and soon (in the next update) users can set email notification preferences.  There is also a “Recent Uploads” widget than can be used to show any number of uploaded documents.

Get it while it’s hot!
WordPress.org Plugin Download Page

Installation
Make sure WPMU and BuddyPress are installed and active.
Copy the plugin folder buddypress-group-documents/ into /wp-content/plugins/

Browse to the plugin administration screen and activate the plugin.

There will now be a “Group Documents” menu item under the “BuddyPress” menu.  Here you will find a list of all file extensions allowed for uploaded files.  Please check and make sure the list suits you.

Please don’t hesitate to contact me, especially if you run into trouble.  I will respond promptly.  email hidden; JavaScript is required

Buddypress jQuery is not defined error

December 16th, 2009

While developing a Buddypress plugin, I was running into a problem where none of my Javascript was working. Instead, Firebug was telling me: “jQuery is not defined”.  This was quite frustrating, as I could verify that the jQuery file was indeed, being loaded.  While a few other people received the same error for different reasons (corrupt files, etc.) I did not quickly find the solution for my problem.  Here it is:

Problem: Buddypress calls your plugin’s JS files BEFORE jQuery files.
This applies when you use the function wp_enqueue_script() – as you should.

Solution: Tell wp_enqueue_script your file depends on jQuery.
It turns out, wp_enqueue_script() takes a few optional parameters – the third being an array of other js files yours is dependent on.

Here’s how the call looks after the change:
wp_enqueue_script(‘my-js-file’,’my-file-path.js’,array(‘jquery’));

Viola!  Your js file is now loaded after jQuery and you’re good to go.