I tested the latest dev, and played around with the vocab integration. I have two specific needs, that is:
1. count the total number of badges for each given user, (e.g. Badges: 12)
2. count the number of badges belonging to each category that the user earns, (e.g. Badges on Contribution: 5, etc.)
Any help would be very much appreciated. Thanks
Comments
Comment #1
nancydruWhere should this be displayed? Badges are already listed on the user page.
Comment #2
gausarts commentedI wanted to display it via node.tpl if any snippet I can use there.
Thanks
Comment #3
nancydruFor sites that have a lot of badges, that could be pretty database intensive unless we saved that information in a table and updated it on the fly. I think Likeless will have to decide on this one.
Comment #4
gausarts commentedOkay. Thanks for the info.
On my current implementation, some user info, which hopefully can include these badges as well, are loaded via cTools ajax when user hover over pictures. This info can be loaded on node.tpl, comment.tpl, views listing or anywhere the trigger (picture) resides.
Comment #5
nancydruYou can probably also figure out how to join it on taxonomy.
Comment #6
gausarts commentedThanks. I really appreciate it.
This will be the last missing piece I need to integrate into the user box.
Comment #7
sophievn107 commentedsubscribing, I also want to do the same thing. can you please more specific on the changes made?
Comment #8
gausarts commentedSorry, not a chance yet. I am in the process of upgrading to drupal 7, so this one must also wait for the port.
Comment #9
nancydruWhen my massive changes for D7 get committed, the user object will contain $user->badges_all and $user->badges (limit applied), so you won't have to query the user_badges_user table.
[EDIT]
It will also have $user->badge_count.
Comment #10
shabana.navas commented