HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

If you tried this Badges plugin, and it works as stated.

peregrineperegrine MVP
edited March 2013 in Feedback

Let me know.

I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Comments

  • Hey there Peregrine, nice plugin.
    I'm new here, and have exactly 1 day experience in the Garden Framework/vanilla. But I have done much work on gamification systems in work-places for the past year and a half. Why not fire-off a badge-check on every update of relevant models (e.g. every post, every like, every vote, etc..)? Also, triggering a notification on each badge using the built-in notification system?

  • @Artamon said:
    Why not fire-off a badge-check on every update of relevant models (e.g. every post, every like, every vote, etc..)?

    This would be a good idea, but I'm not sure that all Models fire an event when they update something.

    Also, triggering a notification on each badge using the built-in notification system?

    This is also a good suggestion (taking note). I would just add that Users should be allowed to turn off the notification.

  • ArtamonArtamon New
    edited March 2013

    @businessdad I will look at the code today and compile a list of hooks where badges can be awarded. What do you guys think of a completely separate application, that manages badges through a restful API.

    here is what I have in mind

    -Vanilla sends out notifications of events to secondary app. (user_id / event_type) (event_type = [newpost, newcomment, newlike, newdiscussion] etc..)

    -Secondary app does a new query depending on event_type group of badges (badges separated by event_type, comment badges, like badges, discussion badges) The query is done asynchronously.

    -Secondary app then updates the Its own Badge DB, which updates user points, levels. Vanilla then will include a simple script to post the Badges on user profiles, and post the level/points below the Avatars. Notification plugin can easily be integrated to by querying the Badge DB on every page load. Or the way I like it: Let the Badge App multicast a push message to the users channel, and add javascript to the template of Vanilla to receive the unicast message

    This way the badge system is somewhat independent. Meaning, we can have other systems integrate with the badge system in a similar fashion.

    thoughts?

  • @Artamon said:
    businessdad I will look at the code today and compile a list of hooks where badges can be awarded. What do you guys think of a completely separate application, that manages badges through a restful API.

    here is what I have in mind

    -Vanilla sends out notifications of events to secondary app. (user_id / event_type) (event_type = [newpost, newcomment, newlike, newdiscussion] etc..)

    -Secondary app does a new query depending on event_type group of badges (badges separated by event_type, comment badges, like badges, discussion badges) The query is done asynchronously.

    -Secondary app then updates the Its own Badge DB, which updates user points, levels. Vanilla then will include a simple script to post the Badges on user profiles, and post the level/points below the Avatars. Notification plugin can easily be integrated to by querying the Badge DB on every page load. Or the way I like it: Let the Badge App multicast a push message to the users channel, and add javascript to the template of Vanilla to receive the unicast message

    This way the badge system is somewhat independent. Meaning, we can have other systems integrate with the badge system in a similar fashion.

    thoughts?

    Sounds good to me.

    I can also certainly add to events. My thoughts were to at least add a badge and point update and on the sign-in event. Probably would need to triggers off of the like and thankful plugins when they add likes and thanks as well.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited March 2013

    Version 1.1 of Badges and Leader board is available

    if you use vanilla 2.0.18.4 and if you want badge updates upon signin, since there is no event.

    you can change in /applications/dashboard/controllers/entrycontroller.php
    

    about 4 or 5 places.

     
    From
     
           Gdn::Session()->Start($UserID);
     

    to
    

     
        Gdn::Session()->Start($UserID);       
        Gdn::UserModel()->FireEvent('AfterSignIn');
      

    I haven't tested in 2.1 but there is already an event so no need to change vanilla 2.1

    Also there some notifications when you receive badges while you are logged in.
    Also badges will update when your profile is viewed or when you post a comment.

    Next to provide changes to like and thankful plugins to trigger badge updates and the badges should be pretty much updated when needed.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @phreak - because you are starting to click awesome.

    I did a special update for you and the others.

    version 1.3 now has charter badge and the rocket ship for the first 100 users who joined your forum.

    also you can check for new versions with this.

    http://vanillaforums.org/addon/versioncheck-plugin

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Wahwahwahwah... 'sabber', 'slurp', 'lost mind'... ;)

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • make that version 1.4.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • SrggamerSrggamer ✭✭✭

    Excellent Plugin Bravo!

  • @peregrine Thanks for adding the Charter badge.

    And yes, the plugin works as stated. I would like your help in making a change, if I may. I see that I have TWO "comment" badges. I only want ONE. I now have a '1' comment badge and a "10" comment badge. Since I have the '10,' it is a given that I earned the '1' and therefore it does not need to be displayed.

  • Mmh, i think the new charter plugin is great. At the beginning of my board i had a lot of spambots registering. i guess the soacked up almost 50 of the charter badges... :)

    @peregrine: how does the routine work, if those spambots get deleted do the next users in the row get the badges or is it simply done by userID > 101 = Charter Badge?

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • @phreak It's by userID < 101 Charter Badge

  • @GaryFunk said:
    peregrine Thanks for adding the Charter badge.

    And yes, the plugin works as stated. I would like your help in making a change, if I may. I see that I have TWO "comment" badges. I only want ONE. I now have a '1' comment badge and a "10" comment badge. Since I have the '10,' it is a given that I earned the '1' and therefore it does not need to be displayed.

    I haven't test it, because I am tired of programming and need a break, but here's a hint to get you going

    see this routine in in the peregrinebadgesmodule.php

       for ($counter = 1; $counter <= $CountCB; $counter++) {
    
                echo Img($prelink . $counter . "comment.png", array('alt' => 'Comments', 'title' => sprintf(T('Comment %s'), $ComArray[$counter]), 'class' => "PeregrineBadgesSmall"));
            }
    
    
    you can change any loop to just an if  statement
    
    // least amount of changes to variables
    if ($CountCB > 0)  {
       $counter = $CountCB;
    echo Img($prelink . $counter . "comment.png", array('alt' => 'Comments', 'title' => sprintf(T('Comment %s'), $ComArray[$counter]), 'class' => "PeregrineBadgesSmall"));
            }
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @peregrine It's easier than that. I just moved echo Img out of the for loop.

  • peregrineperegrine MVP
    edited March 2013

    @GaryFunk said:

    peregrine It's easier than that. I just moved echo Img out of the for loop.

    unfortunately that will probably cause a problem (at least an error that might not be seen, but an error anyway) for users with 0 comment badges. but whatever works for you.

    unless of course you have 0comment.png which could be the turtle.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @peregrine said:
    GaryFunk said:
    unless of course you have 0comment.png which could be the turtle.

    Ah.. Didn't catch that. Got it corrected. Thanks for pointing that out.

  • Hi @peregrine You are certainly doing an awesome job. I would say that I am amazed with what you have put together and in future when my site shows profit, I would definitely contribute some amount to you.

    I installed 2.1 version on 2.0.18.8. Everything works fine except for the summary page which returns a bonk error. Do you want me to show you the detailed error or is it that you are aware of it?

  • @indianfootynet

    I installed 2.1 version on 2.0.18.8. Everything works fine except for the summary page which returns a bonk error. Do you want me to show you the detailed error or is it that you are aware of it?

    I put your question and answer on this page, so I don't have to chase discussion topics.

    http://vanillaforums.org/discussion/23222/feedback-pledges-and-feature-requests-add-them-here#latest

    I consider this thread closed now.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

This discussion has been closed.