Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Any way to "un-award" an awarded badge?

I decided I was too generous in my new forum with the "Commenter" level badges, and want to re do them. A few members have received badges that under the new math, they wouldn't have. It seems to manually remove them I'd have to go through a lot of database tables in phpMyAdmin.

Could I request that a future version of this plugin also give the ability to un-award a badge?

Or maybe there's an easier way that I'm not thinking of?

Thanks!

Tagged:

Comments

  • Thanks for using my addon!

    I specifically did not include the functionality of removing badges from Yaga. Badges represent an accomplishment at a certain point in time. Much like Points not being retro-actively changed when action values or badge awards change, this is the stance of the software. Allowing this on status based badges (which most rule criteria are) would result in removing the badge and then awarding it again the next time the user logs in.

    That said, you can easily remove badges if you have access to the db.

    A plugin that does the exact opposite of BadgeAwardModel::Award() would be fairly easy to write. I will add this idea to my plugin wishlist here: https://github.com/hgtonight/Vanilla-Addons#ideas

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • @hgtonight said:
    Thanks for using my addon!

    Thanks for making it. It rocks! :)

    I specifically did not include the functionality of removing badges from Yaga. Badges represent an accomplishment at a certain point in time. Much like Points not being retro-actively changed when action values or badge awards change, this is the stance of the software. Allowing this on status based badges (which most rule criteria are) would result in removing the badge and then awarding it again the next time the user logs in.

    Makes sense.

    That said, you can easily remove badges if you have access to the db.

    How easily? :) It seemed to me that I've have to remove it from a bunch of places. Am I overcomplicating it? Would be be willing to nudge me in the right direction? :)

    Thx.

  • @FerrariSteve said:

    How easily? :) It seemed to me that I've have to remove it from a bunch of places. Am I overcomplicating it? Would be be willing to nudge me in the right direction? :)

     

    @hgtonight said:

    ...the exact opposite of BadgeAwardModel::Award()...

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • edited December 2014

    @hgtonight: Aight, that's a nudge in the right dir. Thanks.

    Looks like I can just work down the MySQL functions there and reverse them one at a time. :)

    Thx!

  • The basic idea is removing the record from the BadgeAward table, giving negative points to the user for the badge award value, decrementing the user's badge count, and removing any associated activity records.

    Good luck!

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • It looks like I am going to need this feature once in a while too, so I wrote a plugin

    http://vanillaforums.org/addon/yagaunawardbadge-plugin-0.1

    (Especially if you have some badges that are "low hanging fruits" that need some kind of human validation but can still be automatic)

    This also concludes my run of open-sourcing my Yaga customizations :D

  • @hgtonight so if I add a new badge that was, say, "80 likes", do your comments suggest that everyone with more than 80 likes would NOT get retroactively awarded that badge?

    It may not surprise you, based on the nature of my forum and its members from previous comments, that the actual badge I've added is "69 DarkMarks" (a DarkMark is our version of an LOL, since a user called Dark Mark is very funny).

  • @AaronWebstey said:

    hgtonight so if I add a new badge that was, say, "80 likes", do your comments suggest that everyone with more than 80 likes would NOT get retroactively awarded that badge?

    It may not surprise you, based on the nature of my forum and its members from previous comments, that the actual badge I've added is "69 DarkMarks" (a DarkMark is our version of an LOL, since a user called Dark Mark is very funny).

    They would receive the badge the next time they received a DarkMark.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Ah, great! Thanks! You're the man.

Sign In or Register to comment.