3 votes

How to use the Rules module to award userpoints to referring users?

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 ...
W.M.'s user avatar
  • 726
3 votes

Check if certain line item type exists

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 = ...
nvahalik's user avatar
  • 3,622
3 votes
Accepted

How to use User Points to buy/sell a custom content type?

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 ...
Pierre.Vriens's user avatar
2 votes

How to change user badge when 'total User Points' increase?

The key part of your question seems to be this: I tried using the Rules module, but didn't find a way to compare the current total amount of points of the user to my specifications, (for Rules ...
Pierre.Vriens's user avatar
2 votes

How to create a line graph of the total user points on a profile page?

I realize this is an old post, but I wanted to add a workable solution for those that find this question when searching the topic. I've been able to use a combination of the Charts module to create a ...
ymdahi's user avatar
  • 620
2 votes
Accepted

How to check whether one's current User Points are negative with the Rules module?

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 ...
Pierre.Vriens's user avatar
2 votes

How to assign user ranks based on their userpoints?

Your question seems like a perfect usecase for the Goals module (disclosure: I'm its maintainer). It can be used in combination with the userpoints module, though you'd use that combination by ...
Pierre.Vriens's user avatar
2 votes

How to use the Rules module to award userpoints to referring users?

Part 1 - Clarification Here is part of what you wrote in your own comment (below the question now): Event: after user becomes a member Condition: user was referred by another user Action: award ...
Pierre.Vriens's user avatar
2 votes
Accepted

How to pass a variable about sufficient User Points to a Rules condition in another rule?

There is no Rules Condition related to the current total user points for a user. Except by using custom PHP code as in this example (which you could use in a Rules Conditionn Execute custom PHP code ...
Pierre.Vriens's user avatar
2 votes

How to grant User Points after Quiz questions are answered correctly?

If using Quiz 7.x-5.x Assuming you're using the 7.x-5.x-rc3 version of the Quiz module, you can take advantage of integration with the Rules module that this new release comes with. To do so, have a ...
Pierre.Vriens's user avatar
2 votes
Accepted

How to count the number of checked Checkboxes with Rules?

Yes this is perfectly possible with Rules, and you don't need any PHP to get the job done. In your case, the crucial part of such rule is a Rules Action to perform a Loop. If you're not familiar with ...
Pierre.Vriens's user avatar
2 votes

Points-based tasks: pledging and tracking

Goals module You may want to look at the Goals module (disclosure: I'm its maintainer) as a possible alternative. To start using it only requires typical administration tasks (configuration), though ...
Pierre.Vriens's user avatar
2 votes
Accepted

How to track user node views and quiz results

I'd use the Goals module (disclosure: I'm its maintainer) to "track wether user has visited particular node" (as in your question). No need for custom coding. Read on for details how to do so ... ...
Pierre.Vriens's user avatar
1 vote
Accepted

Is there way for create custom "add userpoints transaction" form

Step 1 Use the Rules module to create a Rules Component, which includes whatever Rules Conditions you might need (if any), and with a Rules Action to Grant user points, to the user specified as a ...
Pierre.Vriens's user avatar
1 vote
Accepted

Why do my Commerce rules incorrectly award double userpoints?

Problem in your current rule I'd have to do some Rules debugging to be 100% sure, but I'm "pretty" sure that the core of your problem is the Loop in each of your 2 Rules. Because your rule seems to ...
Pierre.Vriens's user avatar
1 vote
Accepted

How can I remove decimals when I award user points via commerce-order-total:amount

Have a look at the Drupal Commerce issue about "Revise the way we handle price amount values". Especially comment nr 37 in it, which states: The price field is and will continue to store price ...
Pierre.Vriens's user avatar
1 vote
Accepted

How to recalculate the current User Points?

You should have used the Userpoints admin UI or its API (e.g. userpoints_userpointsapi()) to make changes in the records. That way you can make point adjustments without the problem of database ...
Shawn Conn's user avatar
  • 26.8k
1 vote
Accepted

Available approaches for moving userpoints from one user to another

There are at least 2 approaches you can choose from, as further detailed below ... User points donations Use the Userpoints Donation module, which is one of the modules included in the (D7 version ...
Pierre.Vriens's user avatar
1 vote
Accepted

How to grant userpoints only for modifying nodes last changed at least 20 days ago?

Sorry to say, but the previous answer has some challenges: Rules Event After saving new content is not the right event. I disagree with the "You will need a custom module ...", since there is an out-...
Pierre.Vriens's user avatar
1 vote

Add user points to author for every up vote received to content using Rate module

I recommend to go for a combination of these often used modules to add (or subtract) user points when some node is voted up (or down): Voting API. Rules. Voting Rules (attention: alfa version only). ...
Pierre.Vriens's user avatar
1 vote
Accepted

How to access current amount of earned userpoints in a Rules Condition?

There doesn't seem to be some Rules Condition related to the current total user points for a user. Except by using custom PHP code as in this example (which you could use in a Rules Conditionn Execute ...
Pierre.Vriens's user avatar
1 vote

How to award User Points after checkout using Rules?

In order for your Rules Condition to be satisfied, ALL these criteria must be true: Order contains the product whereas the SKU of that product must be "day_4dxivfX2oFRAqQH-Ij6VBFnBheZBRIo744cF46KKPSI"...
Pierre.Vriens's user avatar
1 vote
Accepted

How to grant User Points to viewing user when user has viewed content?

Interesting question, worth to be considered as a great question for a Drupal site building exam! Have a look at this rule: { "grant_user_points_after_content_view" : { "LABEL" : "Grant user ...
Pierre.Vriens's user avatar
1 vote

How to register or track the views of a node per user?

Using the Rules module to solve this challenge is part of the solution you're looking for. But the key part of your challenge is that your question is about something (= access that node) which: has ...
Pierre.Vriens's user avatar
1 vote

How can I refer to a table to make a level system?

Give it some thought to replace that table you made with: a new content type (eg called "XP") and with custom fields as in your question, such as: level number. minimum XP. maximum XP. some ratios. ...
Pierre.Vriens's user avatar
1 vote
Accepted

How can I schedule adding a new field collection item for all users?

Yes this is possible with Rules, if combined with Views Bulk Operations, as further detailed below ... What you actually need to do is similar to what is shown in the video about Using VBO to load ...
Pierre.Vriens's user avatar
1 vote

How to prevent user point totals from going below a threshold for a given user?

For Drupal 7, there is no Rules Condition related to the current total user points for a user. Except by using custom PHP code as in this example (which is similar to the Rules condition in Jeroen's ...
Pierre.Vriens's user avatar
1 vote

How to prevent userpoints from repeating

Another solution is to use the Flag module and create a (global) flag with the purpose to flag users when they are awarded those 25 points. Then extend your existing rule like so: Add an extra Rules ...
Pierre.Vriens's user avatar
1 vote

How to convert User points to vote ballots?

Use the integration between the User Points module and the Rules module to "roll your own cookies", by writing some custom rules to transfer user points from one account to another. As a sample, have ...
Pierre.Vriens's user avatar
1 vote

How to create rule to change user role based on points (using User Points module)?

Your question is about using Rules and find '... something like "total points of the user" ...' (and related to Rules Event "When user points are granted to a user"). So have a look at this Rules ...
Pierre.Vriens's user avatar

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