WordPress.org

Support

Support » Plugins and Hacks » [Plugin: CubePoints] Displaying points in comments

[Plugin: CubePoints] Displaying points in comments

Viewing 8 replies - 1 through 8 (of 8 total)
  • cp_displayPoints() take in a parameter $uid, which, as its name suggests, is the id of the user that you want to display the points amount of.

    So, your code should be something like cp_displayPoints($comment->author);

    Sorry I’m not quite figuring this one out; I’m still a bit basic with PHP.

    I implemented cp_displayPoints($comment->author); in the appropriate place, but now it seems to be outputting the number of points of whoever is logged in and viewing them. I’m not sure I’m necessarily using the right parameter there or if I need to do something elsewhere.

    This is how I have mine and it works fine. It displays like this [ 1015 points ]

    <?php $user = get_userdata($comment->user_id); if(function_exists('cp_displayPoints') && $user->ID){
    echo '[ ';
    cp_displayPoints($user->ID);
    echo ' ] ';
     } ?>
    EMF_saurus

    @emf_saurus

    That works for me as well… except now I’ve realized I’m not putting it in the right place/file after all. Where is yours?

    Tosh

    @xberserker

    Depends on your theme really. What’s a link to your site and theme your using?

    thanks xberserker! The code works perfectly.

    It doesn’t work for me… I am not using buddy press though, just wpmu?

    bump!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: CubePoints] Displaying points in comments’ is closed to new replies.