Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: CubePoints and BuddyPress Intregration?


Tosh
Participant

@xberserker

I got it working :D Adding a update or reply, they get points. If a user deletes his/her own update it’s takes points away.

Only thought I had if I where to delete another users comment/update. It deletes the points from my account instead of theres.

Here is how I’m deleting points:

// Remove 5 points for comment delete
function my_bp_delete_comment_add_cppoints() {
if( function_exists('cp_alterPoints') && is_user_logged_in() ){
cp_alterPoints(cp_currentUser(), -5);
cp_log('Comment Removed', cp_currentUser(), -5, Community);
}
}
add_action('bp_activity_action_delete_activity','my_bp_delete_comment_add_cppoints');

Skip to toolbar