Closed (fixed)
Project:
User Badges
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Jul 2006 at 14:21 UTC
Updated:
17 Aug 2006 at 07:00 UTC
I am looking to have badges similar to the site:
http://www.gotfrag.com/cs/story/33702/?cpage=1
If you scroll down you will notice that the users that have the "Prime" membership, get a "P" next to their name when they post. I would a similar thing on my site. Any suggestions on the code to use, and where I should put it?
Thanks,
Nick
Comments
Comment #1
heine commented- A fully loaded user object ($account = user_load(array('uid' => $uid))) will give you access to the badges via $account->badges[], indexed on badge id (so if you know what id the 'p' has you can use that.
- A faster alternative is user_badges_get_badges($uid) that gives you an array of badges for $uid.
- Both user_badges_for_uid and user_badges_for_user return an html representation of all badges
You can theme badges via theme('user_badge', $badge).
Comment #2
heine commentedlet's try that again
.
- A fully loaded user object ($account = user_load(array('uid' => $uid))) will give you access to the badges via $account->badges[], indexed on badge id (so if you know what id the 'p' has you can use that.
- A faster alternative is user_badges_get_badges($uid) that gives you an array of badges for $uid.
- Both user_badges_for_uid and user_badges_for_user return an html representation of all badges
You can theme badges via theme('user_badge', $badge).
Comment #3
heine commentedComment #4
(not verified) commented