Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


Building a reputation system?

edited March 2011 in Questions
I would like to add reputation and badges to user profiles.

Questions:

Database
Should I add a new user_reputation table or add fields to the existing user table?

Structure & files
Should I implement this as a plugin and how do I hook into user profiles and user profiles in discussions? I haven't built any plugins for Vanilla previously so please point me to the necessary files and resources to accomplish the above.

Thanks!

Comments

  • LincolnLincoln Community Instigator Vanilla Staff
    I'd make use of the UserMeta table. It's for doing things precisely like this and already has some stuff built in for accessing it.

    Here's the plugin quickstart: http://vanillaforums.org/docs/pluginquickstart

    But honestly, right now the best way to figure out how to do something is to look at example code from something similar that's been done. For instance, the Post Count plugin already hooks into the profile and discussions. :)

    Sr Developer at Vanilla Forums [GitHub, Twitter]

  • Thanks, that was really useful. I'll see what I can do with the meta table. I might have to add some more tables for the "many-to-many" badges system though. By the way, I see some magic events being used in the PostCount plugin. Is there a list of all of these and the handlers one can associate with them? Is there specifically a BeforeContent event fired? Thanks!
  • LincolnLincoln Community Instigator Vanilla Staff
    edited March 2011
    A plugin method named [Whatever]Controller_Render_Before($Sender) will always run before any page is rendered.

    Search Vanilla's code for 'FireEvent' and it will give you a list. If it's $this->FireEvent('EventName') in the ProfileController, then the plugin method to hook into it is ProfileController_EventName_Hander($Sender), where $Sender is the object that fired it.

    Achievements would warrant a new table or 2, yes.

    Sr Developer at Vanilla Forums [GitHub, Twitter]

  • LincolnLincoln Community Instigator Vanilla Staff
    You've gotten me re-interested in this. I have a crazy idea I may start work on something like this soon.

    Sr Developer at Vanilla Forums [GitHub, Twitter]

  • edited March 2011
    There is a quick solution, but it would get complex if you have a lot of users.

    You could create different Roles based on how much a person posts -- Newbie, Veteran, etc. Then you could assign users to those roles and have the roles show up on all their posts with the RoleTitle addon. http://vanillaforums.org/addon/roletitle-plugin

    Admittedly this wouldn't give you exactly the configuration you're asking for, but it is a super-quick solution for a site with a small number of users and requires no programming.
  • Hi all, just want to tell you what I was thinking about it.

    The main idea of user karma is:

    Users can vote for or against discussions, reply's and other users.

    So each user will have karma (in future rating) that sum from both votes for discussions, his reply's and other user votes directly for user from whole forum for particular user.

    Same time points can be added for starting discussion, etc.

    My reason for this plugin is to make forum more user moderated and social. How? Easy!

    I want to show on main page only hight rated discussions for last 24 Hrs. If discussion gets a certain amount of votes for it, it automatically going to main page.

    This will help show on main page only best topics for 24 Hrs and will motivate users to think before post and will remove crap from new visitors eyes.

    For reply's is the same. If user gets a certain amount of votes against I will be able to hide his reply in to spoiler.

    If total rating sum for user is in minus (or whatever you define), I will be able to block users from writing comments often than each in 5 minutes and write discussions no often then 1 per day.

    In same time users will be able to vote for or against for other users in they're profile page only once in a whole time. And this vote will have most weight.

    Meanwhile users will not have unlimited votes. They will have only the actual amount of votes that will be given to them each day depends on they overall rating that will be: points (for/againts) for discussion + points (for/againts) for reply's + points (for/againts) for them in profile page. Maybe there can be other more complicated formula, because you can't compare vote for topic and comment by weight.

    That's all.
  • Any progress on this folks?
  • I would really like to see this in Vanilla.
  • LincolnLincoln Community Instigator Vanilla Staff
    Yes, there has been some progress. :)

    Sr Developer at Vanilla Forums [GitHub, Twitter]

  • Wooh! Can't wait to hear about it - I really feel that for some forums, a rep system can make or break it!
  • @Lincoln We are still waiting....... :)

    highwish
  • Still nothing about rank / reputation ? I really wish to add this feature to my vanilla forum.

    Skyyalone
Sign In or Register to comment.