Am I misunderstanding the purpose of userpoint categories? I realize you can make various categories of userpoints but I can't see where to assign the content-type the specific point category. The Points administration settings allow you to set the value of the each content type in points, but there doesn't seem to be any place to link the point taxonomy to the content type in the settings, so apparently the points just total into a pool when it comes to Userpoint Badges.
I want to award badges for various amounts of points achieved in different categories, but the only option in the badge settings is based off the total number of points needed to trigger the badge. It doesn't allow you to select the category of points, just the total number. So you can't say, award a badge when the user generates 50 "blogger" points in the Blog entry category, just for 50 points total.
Is this a Points Category problem or an issue with Userpoints Badges, should I be looking somewhere else for the setting or am I confused about how this works?
Comments
Comment #1
epredator-1 commentedI was just wondering the same thing. I assumed the categories were going to turn up on the badge definition on the UserPoints Goal.
I hope there is a work around, or an update. If not I better start coding as its essential to the work I am doing at the moment :)
Comment #2
epredator-1 commentedAnswering with a work around that should be ok.
Rather than using the badges userpoints goal (which is only the default one)
Use a rule to be able to issue a badge.
Create a rule
Based on User has been awarded points (the rest of the things start to become available as you step through
Add a condition that userpoints >= x
This allows you to then select A userpoints category to check (in you previously defined taxonomy)
Then you can add an action to Add a badge from based in this rule.
That seems to be a valid and not too bad workaround
Comment #3
hokuspokus commentedI originally started looking at the solution from the Rules perspective, but I ran into trouble there as well. I had to root around for my own answer here in the Rules support queue http://drupal.org/node/883270, but it seemed like I was hitting a dead end there also.
If you get it to work can you lay out the steps you used, maybe it's just my install...?
Comment #4
epredator-1 commentedIt did just seem to work for the example I had.
I have a badge defined but it has nothing in the User points goal, i.e. thats left blank
My userpoints taxonomy has a number of categories defined.
In /admin/settings/userpoints I am adding points to the category "inviter" when users invite others to the site
The points increment fine.
The triggered rule is this one
This is the rule export if that helps at all syntax wise. It triggers on reaching 10 points in the category.
Presumably the badges work when you just checkbox them for the user on user/n/badges ?
array (
'rules' =>
array (
'rules_1' =>
array (
'#type' => 'rule',
'#set' => 'event_userpoints_event_points_awarded',
'#label' => 'inviter',
'#active' => 1,
'#weight' => '0',
'#categories' =>
array (
0 => 'inviting',
1 => 'users',
2 => 'badges',
),
'#status' => 'custom',
'#conditions' =>
array (
0 =>
array (
'#weight' => 0,
'#type' => 'condition',
'#settings' =>
array (
'amount' => '10',
'type' => '4',
'#argument map' =>
array (
'user' => 'user',
),
),
'#name' => 'userpoints_rules_amount',
'#info' =>
array (
'label' => 'Userpoints amount is >= than x',
'arguments' =>
array (
'user' =>
array (
'type' => 'user',
'label' => 'User',
),
),
'module' => 'Userpoints',
'eval input' =>
array (
0 => 'amount',
),
),
),
),
'#actions' =>
array (
0 =>
array (
'#weight' => 0,
'#info' =>
array (
'module' => 'User',
'arguments' =>
array (
'user' =>
array (
'label' => 'User',
'type' => 'user',
),
),
'label' => 'Add badge',
'base' => 'rules_core_action_execute',
'action_name' => 'user_badges_add_badge_action',
'configurable' => true,
),
'#name' => 'rules_core_user_badges_add_badge_action',
'#settings' =>
array (
'badges' =>
array (
9 => 9,
),
'#argument map' =>
array (
'user' => 'user',
),
),
'#type' => 'action',
),
),
'#version' => 6003,
),
),
)
Comment #5
1kenthomas commentedDuplicate of feature RQ at http://drupal.org/node/480312 .