AFAIK the PCP module currently displays the % for the currently logged in user. I want to use it on the profile page, showing the % of the user being viewed. How do I do that? Thanks.

Comments

therealwebguy’s picture

Status: Active » Closed (fixed)

The best approach to this right off the bat is use custom PHP code in your block configuration settings for the PCP modules. I'm assuming that you are using Drupal's default user/uid for the profile page. If that is the case, you could place something like this in your block display settings box under PHP input mode:

<?php
if ((arg(0) == "user") && (is_numeric(arg(1)))) {
  return true;
}

return false;
?>

Also, you are most likely going to want and override theme_pcp_profile_percent_complete() so that a "hint" link is not provided. This link will generate an access denied error sense the viewer clicking the link is not authenticated with the correct User ID for the generated Link.

Hope that this helps. Sorry for the long response.