Setup EasySocial Achievements

From JReviews Documentation
Revision as of 23:40, 25 September 2014 by Jreviews (Talk | contribs)

Jump to: navigation, search

The JReviews integration with EasySocial includes out of the box support for EasySocial achievements based on JReviews actions. The first step to begin using this feature is to make sure you have enabled the EasySocial integration in the JReviews Configuration/Community Tab.

Types of Achievements

We've added code in JReviews that will process achievements for the following user activities:

  • Submitting a listing
  • Submitting the first review for a listing
  • Submitting a review
  • Submitting a review comment
  • Adding a listing to the favorites list
  • Uploading any type of media; or uploading a specific type of media (photo, video, attachment, audio)

For each of the above activity types, except for submitting the first review for a listing, we've added three tiers low, medium and high. This allows site admins to award a new badge after the new tier is achieved. For example, if you set the three tiers for submitting reviews at 5, 10 and 20 reviews. The user will earn a badge for each of those tiers.

Achievement Commands

EasySocial requires a rule to be setup for each type of achievement. Each rule requires a unique 'command'. The following commands are pre-defined in JReviews and these are the ones you can use when creating your EasySocial badge rule file. We'll get more in to that further below.

Listings

listing.add.low listing.add.medium listing.add.high

Reviews

review.add.first review.add.low review.add.medium review.add.high

Review Comments

review.discuss.low review.discuss.medium review.discuss.high

Favorites

favorite.add.low favorite.add.medium favorite.add.high

Media (any type)

media.add.low media.add.medium media.add.high

Photos

photo.add.low photo.add.medium photo.add.high

Videos

video.add.low video.add.medium video.add.high

Attachments

attachment.add.low attachment.add.medium attachment.add.high

Audio

audio.add.low audio.add.medium audio.add.high

Creating Achievement Rules

Here we'll refer you to the StackIdeas documentation for EasySocial where they have a page on Creating a Rule File for Badges

[    // Listings    {        "title"         : "Few listings",        "description"   : "",        "howto"         : "To unlock this badge submit 5 listings.",        "alias"         : "listing-low",        "extension"     : "com_jreviews",        "command"       : "listing.add.low",        "avatar"        : "media/com_easysocial/badges/listings-low.png",        "frequency"     : 5    },    {        "title"         : "Some listings",        "description"   : "",        "howto"         : "To unlock this badge submit 10 listings.",        "alias"         : "listing-medium",        "extension"     : "com_jreviews",        "command"       : "listing.add.medium",        "avatar"        : "media/com_easysocial/badges/listings-medium.png",        "frequency"     : 10    },    {        "title"         : "Lots of listings",        "description"   : "",        "howto"         : "To unlock this badge submit 15 listings.",        "alias"         : "listing-high",        "extension"     : "com_jreviews",        "command"       : "listing.add.high",        "avatar"        : "media/com_easysocial/badges/listings-high.png",        "frequency"     : 15    },    // Reviews    {        "title"         : "First Reviewer",        "description"   : "First one to review a listing.",        "howto"         : "To unlock this badge be the first one to review a listing.",        "alias"         : "first-reviewer",        "extension"     : "com_jreviews",        "command"       : "review.first",        "avatar"        : "media/com_easysocial/badges/superstar-shield-64.png",        "frequency"     : 1    },    {        "title"         : "Occasional reviewer",        "description"   : "",        "howto"         : "To unlock this badge submit 5 reviews.",        "alias"         : "review-low",        "extension"     : "com_jreviews",        "command"       : "review.add.low",        "avatar"        : "media/com_easysocial/badges/reviews-low.png",        "frequency"     : 5    },    {        "title"         : "Frequent Reviewer",        "description"   : "",        "howto"         : "To unlock this badge submit 10 reviews.",        "alias"         : "review-medium",        "extension"     : "com_jreviews",        "command"       : "review.add.medium",        "avatar"        : "media/com_easysocial/badges/reviews-medium.png",        "frequency"     : 10    },    {        "title"         : "Avid Reviewer",        "description"   : "",        "howto"         : "To unlock this badge submit 15 reviews.",        "alias"         : "review-high",        "extension"     : "com_jreviews",        "command"       : "review.add.high",        "avatar"        : "media/com_easysocial/badges/reviews-high.png",        "frequency"     : 15    }]