How to calculate user scores based on 3 variables to assign an appropriate text label? I need to calculate a score for users in D7 based on 3 variables and then assign an appropriate text label and a CSS class.

So, using data from Voting API, time ago joined, and number of nodes published, it needs to select and display one of 15 text labels such as "Promising newcomer, reliable veteran, etc".

Given that I am a site builder with limited PHP skills, where should I start? Should I setup 15 different rules to set a value on a list field?

Before investing time in Computed Field, Display Suite Custom Field or Views PHP, I would love advice from the Drupal community.

Looking for something similar to SE badges.
A possible answer is to trigger Rules Actions based on a combination of Rules Events that happen asynchronously, and optionally after they were repeated multiple times. Which also requires some type of recording of the progress being made. Pretty challenging specs, but there is a solution (module) for it, as further explained below.

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 it does come with various hooks also for custom module development (if you want to).

Since the Goals module is entity based, it has out-of-the-box integrations with modules such as Views, Rules, Flag, etc.

Requirements mapping


  I need to calculate a score for users in D7 based on 3 variables and then assign an appropriate text label and a CSS class.


calculate: that's what Goals will do for you, by recording the progress made on the completion of each task required to reach a goal.

3 variables: that sounds like 3 tasks to be completed to achieve 1 goal.

assign an appropriate text label: you can optionally attach a (custom) image to each goal. The goals completed by a user, can be shown on a Views block included with Goals, with title "Your completed goals".


  So, using data from Voting API, time ago joined, and number of nodes published, it needs to select and display one of 15 text labels such as "Promising newcomer, reliable veteran, etc".


using data from...: if you can think of a Rules Event to discover these events, you use the appropriate Rules Action (provided by Goals) to record progress on the completion of a task. E.g. if 1 such task would be to "create 10 nodes of type XYZ", then each time such nodes are saved (there is a Rules Event for it!), then Goals will record so. And if 10 such nodes were recorded, the task is considered completed. And if all tasks of a specific goal or completed, then the goal is reached. 

Here is a screenprint of a rule to record a task activity about posting comments:



15 text labels: that sounds like 15 goals you'd have to configure using the admin interface of the Goals module (no custom coding involved).

More details

For more details about the Goals module, refer to my answer to "How to implement gamification in a Drupal site and award incentives?".