6

Theres is a module to add rules to voting api: http://drupal.org/project/voting_rules Userpoints comes with native rules support. I just set the whole thing up on my test environment, added a new Rule with Event: User votes on a Node Condition: User has role(s) Parameter: User: [vote:user], Roles: authenticated user Condition: Check the value of the ...


6

You can use userpoints_userpointsapi and pass points in negative if you want to deduct. example $params = array( 'uid' => $user->uid, 'points' => -5, 'operation' => 'mymodule_some_operation', ); userpoints_userpointsapi($params); For more information http://drupal.org/node/993376 http://api.worldempire.ch/api/...


5

Userpoints can not be deleted, at least not through the UI. Instead, you need to create a reverting transaction that removes the points that the other transaction added, or the other way round. The only thing that you can currently do out of the box is building a link that points to the add points form with the username pre-filled, by using that as a token ...


5

Adding a module to override User Karma's settings is certainly one option. Another possibility is to use Rules and Voting_Rules to control your own settings for adding and subtracting user points. Once enabled you go to /admin/config/workflow/rules and "Add New Rule". Set it up to React on Event "User votes on a Node". Add the condition "Check the value ...


5

Use roles. The only problem with 10+ roles is that your permission table is going to get huge but you can solve this by limiting it per role (see link on roles list) or use a module like faster permissions. The loading of roles is most likely much faster than doing custom checks. Also, when doing something like this, you'll certainly run into issues, for ...


5

At first I tried to answer your question using rules and userpoints module, but I saw that while adding Grant points to a user as action there is no such data selector for selecting the user who has created the product. I found the data selector for selecting the user who is the owner of order, but that is not your requirement. (That is why I clarified this ...


5

I have userpoints active on one of my sites, and the display you are looking for is integrated with the module. Look at the user account, there should be a tab (Points) (/user/$uid/points). To create your own page, introduce a required relationship to the users table, then a contextual filter using that relationship on user:uid. When the configuration ...


4

Use rules. When the order is completed, use the actions contained in the userpoints_rules submodule to manage your userpoints. You might choose the "When an order has been paid in full" or you could just watch for orders moving in status to "Completed."


4

Create a product of type userpoints and upon successful payment add a rule to update userpoints for that user.


3

Have you tried the user points contrib module. I am specifically referring to userpoints_role Users join/leave roles as they earn/lose certain points threshold.


3

You can add the same filter programmatically to your view. /** * Implements hook_views_pre_view(). */ function YOURMODULE_views_pre_view(&$view, &$display_id, &$args) { if ($view->name == 'your_view_machine_name') { $info = array( 'table' => 'field_data_field_points', // name of your “Points” field table. 'field' => '...


3

Heartbeat and Activity are both specifically intended for showing user activity (like on Facebook, Twitter, etc.) Heartbeat is going to be deprecated in favor of Message. According to the Heartbeat module page: This project will be deprecated. The future would be in the module Message. It's much smaller and it cannot be compared to heartbeat when it ...


3

I don't think there already exists a module for this. What you need to do is implement hook_user_update() and check if the user now has a picture assigned but didn't before. If so, use userpoints_userpointsapi() to grant the user the number of points you want. Something like this: <?php function yourmodule_user_update(&$edit, $account, $category) { ...


3

There is a module in the userpoints_contrib project, which does exactly this. You can combine it with userpoints_nc or a rule to also deduct points when a node is created, so that creating nodes costs something.


3

You'll probably have to use the Rules module to make it happen. Maybe create some kind of custom field (integer) to store the value of your target points value. ie. target points field = 100 points Now, you can create a Rule to activate on the event "user awarded points", so that every time a user gets points, that rule is run. Next, have that rule ...


3

Userpoints has an API. See especially userpoints_userpointsapi() Something like this: userpoints_userpointsapi(array('uid'=>$some_user, 'points'=>9000)); You might also be interested in the Quiz module which supports Userpoints.


3

in these pages you can find what you need. User Points This is a module User Points Contributed modules more modules! Choose the one that fits in your website.


3

Statistics module in the core would work in this case.


3

Here the solution with custom module implementation: implement hook_userpoints($op, $params) function in your custom module to check the user points in every transaction with two option called points before and points after. For your thing check if the points are less than your threshold value, set your threshold value after the transaction. for more ...


3

You can check for a certain type of line item on an order using one of the two following methods. Given an order, let's look for a shipping line item. // Load your order. $order = commerce_order_load(/* Order ID */); Without Metadata Wrappers if (!empty($order->commerce_line_items)) { // Iterate over the line items. foreach ($order->...


3

There's a way to use Rules, Webform and Webform Rules together, by adding a number field with initial value 0 in your user fields. Every time user completes a task, validating a form submission, a value will be added to your field. That's the points field, which would be, in this case, unique. There is no sum in this case, but the field value will be ...


3

Add a field to user registration form that collects the uid of the referring user. Then ask current users to invite other people to the site using a custom URL to user registration form and this URL should include as query parameter the uid of the referring user. Hook the user registration form and fill in the uid of the referrer based on the query parameter....


3

Use the integration between the User Points module and the Rules module to create some custom rules to transfer user points from one account to another. As a sample, have a look at this rule, which is used in combination with voting of a node, whereas the author looses "-2" points, and the voter looses "-1" points: { "rules_votedown_question" : { "...


2

Actually, this is what I am trying to build right now. Use the hook_user_login() with the following code: global $user; $last_access = $user->access; // if last_access is today, do nothing $yesterday_start = mktime(0, 0, 0,date('m'), date('d')) - (60*60*24); $yesterday_end = $yesterday_start + (60*60*24)-1; // if last access is yesterday, ...


2

you can try rules module to achieve this. Create a event like "when a node is saved" and provide some condition if required and then action like grant/deduct user points. User points is integrated with rule.


2

You should try to implement the hook form alter Drupal API: hook_form_alter Within the hook_form_alter you can validate, if the current user has more then 30 Points and disable the voting widget if the value is below 30.


2

I finally found a solution! I completed the second scenario (the amount of User Points is calculated) successfuly! Apparently, the User Points module didn't know that the calculation was an integer. Therefore, I had to add an extra action Convert data type: Target type: Integer, Value to convert: [result], Rounding behavior: Always down. I called it 'total' ...


2

global $user; $num_pts = userpoints_get_current_points($user->uid, 'all'); $neg_pts = $num_pts < 0;


2

Have a look at this Rules example (in Rules export format): { "rules_display_userpoints_after_updating_content" : { "LABEL" : "Display userpoints after updating content", "PLUGIN" : "reaction rule", "OWNER" : "rules", "REQUIRES" : [ "userpoints_rules", "rules", "rules_conditional" ], "ON" : { "node_update" : [] }, "DO" : [ { "...


2

The problem arises because the Flag module runs before Rules, so it has already removed the flag before Rules performs its test. One way to deal with this is to install Modules Weight which will allow you to adjust the relative priorities of modules so Flag runs after Rules.


Only top voted, non community-wiki answers of a minimum length are eligible