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
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.