开发者

How to customize User points section in user profiles

开发者 https://www.devze.com 2023-01-09 05:25 出处:网络
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 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开发者_如何学Python:

<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


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)
0

精彩评论

暂无评论...
验证码 换一张
取 消