BuddyPress Integration

BuddyPress is not very well integrated with the WordPress core functions. For example, BuddyPress does not register custom post types with WordPress, does not store its images in the WordPress Media Library, or provide members access to their Biographical Info in the WordPress profile. These integration issues lead to some limitations that can take some effort to overcome.

BuddyPress Avatar and Group Images

By default, member avatars are provided by Gravatar. NGFB recognizes Gravatar URLs, and can include Gravatar images of the correct dimensions in webpage meta tags. If a member changes their default avatar image, or an avatar image is assigned for a group, BuddyPress will save those images with a dimension of 150x150px (by default). This is much too small for Facebook or any other social website to use when a member or group webpage is shared. To include the custom BuddyPress member and group images in the webpage meta tags, you must adjust the BuddyPress full size image dimensions. Add the following to your bp-custom.php file, and increase the default BP_AVATAR_FULL_WIDTH and BP_AVATAR_FULL_HEIGHT from 150 to 200 or more (larger is better). The thumbnail sizes can remain the same — I’ve included them here, with their default values, for informational purposes only. See the Customizing BuddyPress Avatars guide for additional information.

If the BP_AVATAR_FULL_WIDTH and BP_AVATAR_FULL_HEIGHT values you’ve chosen are smaller than the Image Dimensions in the NGFB Social Image Dimensions settings, you will also need to uncheck the Enforce Image Dimensions Check option on the Advanced settings page under the WP / Theme Integration tab.

As an alternative, you could specify much larger BuddyPress full size width and height values, and downsize / adjust them on BuddyPress pages using CSS. The result will be member and group images featured more prominently on some social websites (Facebook prefers images larger than 600×315, for example).

BuddyPress Activity Images and Videos

The BuddyPress activity content is analyzed for images and videos like traditional WordPress Post or Page content. Unfortunately, since BuddyPress does not use the WordPress Media Library functions, images within the content cannot be detected by their image ID alone. This means that image HTML tags within the activity content must have a width and height attribute larger than the Image Dimensions you’ve chosen on the NGFB Social Image Dimensions settings page (or uncheck the Enforce Image Dimensions Check option on the Advanced settings page under the WP / Theme Integration tab). If you can, adding correct image width and height HTML attributes is the recommended solution.

As an alternative, you can also use the BuddyPress rtMedia plugin, which integrates properly with the WordPress Media Library (and is supported by NGFB Pro).

Allow Small or Unknown Size Images

If you’re comfortable with WordPress filters and/or PHP code, you can also hook the ‘ngfb_content_accept_img_size’ filter to globally accept BudyPress images in activity content that may be too small and/or have an unknown size.

Example:

BuddyPress Member Biographical Info

The BuddyPress member profile does not include the standard WordPress Biographical Info text from the user profile page. If you’ve created a second BuddyPress Profile Field for members to enter a description of themselves, you can define a constant in your wp-config.php file to let NGFB know about this additional (and preferred) profile field name.

Example: