views:

26

answers:

1

hi,

I'm using User Points module which adds an User Points tab to the users profiles.

I want to remove the link "View" from the user Points tab in User profiles, and leave only the score number.

I'm looking for the template using theme developer module: http://dl.dropbox.com/u/72686/userpoints.png

However, the template user-profile-item.tpl.php contains only:

<dt<?php print $attributes; ?>><?php print $title; ?></dt>
<dd<?php print $attributes; ?>><?php print $value; ?></dd>

and I cannot do a lot with it.

The template contains only:

<div class="profile">
  <?php print $user_profile; ?>
</div>

So, where is the template I need to modify how the User Points are displayed in user profiles ?

thanks

+2  A: 

The user profile is a bit tricky because it's so generic. In this case you don't want to change the markup but the actual content.

You can do this by.

  • use hook_preprocess_user_profile where you can alter the value used
  • Implement hook_user yourself, and overwrite the data provided by user points module to remove the unwanted links. (They are only available if you have permission)
googletorp
+1 - looking at the `userpoints_user()` operation 'view' implementation, one can see that the 'View' link is added directly from code, so no chance to change that at the theme level. Probably best to just copy the part and use the adjusted copy to overwrite the output of the module itself.
Henrik Opel

related questions