|Number of votes:||6|
As you may or may not have noticed, we’ve just released (Tuesday 20th) our community recognition program (CRP). We’ve published a page about the community recognition program explaining how to score points etc., but we though we’d show you how it was built. It’s not super advanced or anything, but hopefully it can act as another sample for how to work with the DDS.
Firstly, here’s a picture I drew to illustrate how it all works:
As you can see, all the things you users do on EPiServer World, like post blogs (syndicated blogs also count), write comments, reply to forum threads etc, generates a contribution object that goes into the DDS bucket. The contribution object holds info about date, type (blog post, article, etc), pageid (to link a contribution to a page if relevant), points, user and notes (for internal use).
As shown in the picture, the DDS also holds the config monster and a book of levels. These two enable us to set how much points each contribution should be worth and how many points you need to advance to a higher level.
To make all this work, we’ve used a little something we like to call “code”, Let’s dig in!
Firstly we have a plug-in to subscribe to the relevant events and handle the creation of contribution points whenever you, well, contribute.
The plug-in simply pulls out the relevant information from the pages and sends the values to our contribution data layer that handles all dealing with the DDS.
Sure, I’ve removed a lot of code for clarity, but basically, that’s about it.
I won’t show the recognition gadget, because it’s really nothing fancy, or pretty, but I might be back with another blog post covering some gadget stuff.
Some cred should go to Pontus Lidén who built the first prototype of the CRP during his internship with us.