There's a function to call cubepoints points for buddypress under groups topic.php posted by a good friend on stackoverflow here:
add_filter('bp_get_the_topic_time_since_last_post','bp_forum_extras_get_the_topic_time_since_last_post');
add_action('bp_get_the_topic_post_poster_avatar', 'topic_poster_avatar');
function topic_poster_avatar($avatar) {
preg_match_all('/user-([0-9]+)-avatar/', $avatar, $m);
$id = $m[1][0];
if ($count = get_user_meta($id, 'cpoints', 1))
return $avatar . '<div class="cp-avatar-counter"><center><span class="number">' . $count . '</span> Points</center></div>';
return $avatar;
}
I wanted to know if you knew the function to call cubepoints ranks as a function for buddypress? The code below is used for BB press not buddypress. cp_module_ranks_getRank should be used to call cubepoints rank but how would I make that into a function like above?
<?php echo cp_module_ranks_getRank( bp_displayed_user_id() ); ?>