Archive

Posts Tagged ‘buddypress’

Buddypress Extended Profile Image Field Plugin

March 12, 2014 7 comments

I had detailed a while back in this post the steps to adding an image field type to your BuddyPress Extended Profiles component. A lot of people (as is evident from the comments) got some good use out of that. However, PHP and Javascript are not everyone’s cup of tea so there were many challenges in getting the raw code to work.

I finally got some time to package the code into a plugin which you can download at the WordPress Plugins repository. Give it a spin and let me know how it fairs in your particular setup. The plugin should be ok on WordPress 3.2.1 to 3.8.1 running BuddyPress 1.5 to 1.9.2

Thanks very much for all the feedback I got in the comments on the behaviour of the code.

 

UPDATE:

Plugin en el español (http://wordpress.org/plugins/buddypress-xprofile-image-field/) por Andrew de WebHostingHub. Gracias Andrew!

How to Add an Image Field to Buddypress Extended Profile Fields

March 10, 2012 142 comments

BuddyPress is a plugin that brings social networking capabilities to WordPress. It comes with features such as Friend connections, Activity streams (status posting), Private messaging, Groups and Forums. There is lot’s more you can do with it via BuddyPress Plugins. These are simply WordPress plugins that are compatible with BuddyPress. You can work with BuddyPress as just one component of your WordPress website’s functionality, or you can have it as your central component and completely hide the rest of WordPress. Just like WordPress, BuddyPress is completely open source and almost as flexible.

How BuddyPress Works

1.   Hooks

Being part of the WordPress ecosystem, BuddyPress employs hooks liberally in its implementation. These help theme and plugin developers greatly when it comes to interfacing with BuddyPress in a future-proof manner. When used correctly, the hooks allow developers to write code that doesn’t break on newer versions of BuddyPress.

Among the most important hooks in BuddyPress are:

–  bp_screens:  It processes functions that respond to user input with visual feedback. Basically this is the hook to use when you want to output a page in response to user input. A good example is displaying a list of friends in response to the clicking of the friends menu.

–  bp_actions:  This hook is similar to bp_screens, but does not give visual feedback. A good example of such is when accepting a friend request. This hook is called before bp_screens and we shall use this rule in implementing the image field.

2.   Components

Functionality in BuddyPress is delivered via components. Roughly, a component maps to a feature. For example the Groups feature is handled by the Group component. Components contain the various bp_screens and bp_actions hooks required to respond to user input. A fresh installation of BuddyPress has the following components:

–  Extended Profiles:  maintains user profile details such as name

–  Friend Connections:  allows users to make and accept friend requests

–  Private Messaging:  handles messaging between specific users. Only the users addressed in the messages can view them.

–  Activity Streams:  handles the posting of public statuses and generally tracking the actions of users.

–  Groups:  handles the creation and maintenance of user groups. Users can create groups, invite other users etc.

–  Forums:  this component allows topical discussions to be carried out among users either site-wide or within groups.

Read on »