User Karma

A typical use case is that you want to give active contributors to your community elevated rights as they reach a certain level. Typically, on a news site, you want to reward active bloggers and if you are creating the next World of Warcraft, you want to add functions to advance users' avatars through the epic sets.

Both of these scenarios are possible using VCE's reputation module.

Before this feature can be used, it needs to be enabled through publication feature resources.

qualification.userQualificationEnabled=true
qualification.initialUserGroup=Rookie
qualification.autoGroupChangeEnabled=true

Once these features are enabled, the publication will need a set of qualification groups with rating ranges based on which community users can be grouped. As an example, a community site may have some qualification groups defined as follows:

  • Rookie: All users with qualification value [0, 1] belong to the group.

  • Regular: All users with qualification value [1, 3] belong to the group.

  • Pro: All users with qualification value [3, 5] belong to the group.

VCE automatically updates the users' qualification when someone rates an article. A user's current qualification group can be presented on the site as follows:

<%@ taglib uri="http://www.escenic.com/taglib/escenic-qualification" prefix="qual" %>
...
<community:user id="communityUser" name="section"/>
<div>
  <qual:userQualification id="qual" userId="communityUser.id"/>
  Group name: ${qual.group.name}
</div>
...

On many community sites, the best writers/authors of the site are listed on the front page. A feature like this can be implemented with the VCE taglibs as follows:

<qual:userQualifications id="userQualifications" groupName="Pro"/>
<div>
Group: ${qualGroup.name}<br/>
  <ul>
    <logic:iterate id="qualifiedUser" name="userQualifications"
                   type="com.ndc.qualification.api.domain.UserQualification">
      <community:user id="communityUser" userId="${qualifiedUser.userId}"/>
      <li>${communityUser.article.title}</li>
    </logic:iterate>
  </ul>
</div>

The above JSP segment will render all authors of the community belonging to the qualification group Pro.