Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: [New Plugin] CubePoints Buddypress Integration!


vee_bee
Participant

@vee_bee

I added the points next to the users name in both the side bad, and also on the persons profile by using the following in my bp-custom.php.

Does anyone know the hooks for when someone ‘Likes’ something?

function my_bp_add_cppoints_display_my_points()
{
if ( is_user_logged_in() )
{
if(function_exists(‘cp_displayPoints’)){
echo “Points: “;
cp_displayPoints();
}
}
}

add_action( ‘bp_sidebar_me’, ‘my_bp_add_cppoints_display_my_points’ );

function my_bp_add_cppoints_displaypoints()
{
if(function_exists(‘cp_displayPoints’)){
global $bp;
echo “Points: “;
cp_displayPoints($bp->displayed_user->id);
}
}

add_action( ‘bp_before_member_header_meta’, ‘my_bp_add_cppoints_displaypoints’ );

Skip to toolbar