Website: Sclabs/ points

Submitted by sean on Tue, 06/21/2011 - 12:31


Profile pointsThis article summary the technical aspects of the points system implemented for in 2010.

To encourage user interaction with the Swisscom labs, points are awarded for certain actions, and "achievements" for specific events.
On you can earn points depending on your activity and points eventually increase your ‘level’. ....  Specific actions such as Login earn points ... as you increase your amount of points your level increases. Certain actions earn Achievements (writing many comments, submitted ideas..), with extra points and a "medal" shown in your user profile.

User List



Several standard modules were used:

 Points: The points module, is the basis for managing points.
    Userpoints    6.x-1.1, User Points Voting API 6.x-1.41, Role exempt 6.x-1.0-beta1,
    Userpoints Admin Email, Userpoints Invite, Userpoints Login, Userpoints Nodes and Comments,
    Userpoints Register, Userpoints Reset, Userpoints rules integration,

    Configuration: define points per events.

Achievements as implemented with the User Badges module.
   User badges    6.x-1.5, Userpoints Badges
   Configuration: define achievements names /icons

 Levels: User titles    6.x-1.x-dev,     User titles userpoints, User titles views
    Configuration: Create titles(=level) (1,2,3,..20) and a points threshold per title.

 Changing texts (Badges>achievements, titles>levels..): Stringoverrides

 Vote up/down is used for the "like" buttons and via the voting api also generates points.

Patches: one minor patch to vote_up/down to allow anonymous users to view the voting widget. In general upgrades are not easy, very careful testing needed.

Custom modules


Shows the User's portrait with a summary of points and achievements in a blocked. This module has been released on


This is a site specific module that is changing according to site strategy. Its awards achievements and points for events not covered by the standard modules.

Userpoints Visits awards (configurable) points for

  • very first visit (among all users) to a user
  • answering a poll
  • answering a webform/questionnaire
  • visiting page types (no longer used)

Achievements: Award 'user badges' based on points/activity, e.g.

  • Celebrity: achievement when Like button has been clicked on articles/comments of an author    (by other users). e.g. after author receives 100 pts
  • registration
  • first visits to specific node IDs. e.g. Scientist: Visited the faq page: 10 pts
  • Writer: write 50 comments: 700 points
  • answer 50 polls 'prophet' 500 points
  • Analyst: 10 Surveys filled out 500 pts
  • Innovator: you have written 5 ideas
  • Inspirer 100 ppl liked your idea

Display: A message is shown to the user when poits are earned, if that message is enabled in userpoints. The list of point events can by viewed in the Users 'My Points' menu. Badges/achievement can be seen in the users profile.


  • The workhorses were hook_comment(), hook_user(), hook_form_alter(), hook_vote(), hook_cancel(), hook_form_submit(), _nodeapi(), _cron(), _votingapi_insert()
  • Rules actions "grant points to a user, a token can be used in the message", "first node visit" were also developed.
  • DB tables: userpoints_visits, userpoints_visits_users, userpoints_visits_polls


Explanation of points/achievements for the Labs
User list with points/achievements  (login first)