Setup EasySocial Achievements

From JReviews Documentation
Revision as of 23:52, 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

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, apt_sources, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, j, java, java5, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nsis, oberon2, objc, objeck, ocaml, ocaml-brief, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, php-brief, pic16, pike, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, rails, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, spark, sparql, sql, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic


[
    // 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
    }
]