Skip to:
Content
Pages
Categories
Search
Top
Bottom

How can i display the cubepoints rank of a user in the singe page of a group forum?

  • Avatar of skateage
    skateage
    Participant

    @skateage

    website: http://www.skateage.com/

    what i am trying to achieve seems quite simple however i cant seem to figure it out…

    i would like to either show the points of a forum poster or the rank image in the poster-meta area.

    Im having some trouble finding shortcodes for cubepoints as well.

    Thanks a million for anyone who can figure this out for me!!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Avatar of Tosh
    Tosh
    Participant

    @xberserker

    This might get you started, we never figured it out though …

    http://buddypress.org/community/groups/cubepoints-buddypress-integration/forum/topic/template-tags-1/

    This would be better directed at the CubePoints Support Forum – http://cubepoints.com/forums/

    Avatar of Timothy Tarmon Jr
    Timothy Tarmon Jr
    Participant

    @timothyjunior

    points : `displayed_user->id); ?>`
    rank : `displayed_user->id); ?>`

    as you can see here http://animetool.net/connect/members/january14n/activity/2076 – old site might still work tho.

    i added this to /wp-content/plugins/cubepoints-buddypress-integration/includes/bp-cubepoint-functions.php
    rank image:

    `<?php
    $con = mysql_connect(“localhost”,”username”,”password”);
    if (!$con)
    {
    die(‘Could not connect: ‘ . mysql_error());
    }

    mysql_select_db(“-database-name-”, $con);

    $name = cp_getRank($bp->displayed_user->id);

    $sql = “SELECT * FROM wp_cubepointsRanks WHERE name=’$name’”;
    $result = mysql_query($sql);
    while($row = mysql_fetch_array($result))
    {
    $IMG = $row;
    }

    echo “” . “” . ““;

    mysql_close($con);
    ?>
    `

    tested here http://animetool.net/connect/members/january14n/ – again very old site… stopped working on it about the time i figured it out.

    @xberserker sorry man, i forgot all about you asking me this 6 months ago. it probably doesn’t work now with the newer versions of wordpress. but its a starting point

    ref w3schools.com to learn about more about mysql

    Avatar of junger
    junger
    Participant

    @junger

    Here’s a simple little tool to show a member their own Rank outside of their profile page …

    You can’t use `displayed_user->id); ?>` outside of the profile page for some reason, but grabbing the user’s id using bp_loggedin_user_id does the trick.

    This won’t work when you’re trying to display multiple users on one page, like in the Forum post or Activity feed, but maybe one of the other Template tags will.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.