Support » Plugin: BadgeOS » Feature request

  • Resolved CreativeDan

    (@creativedan)


    Was wondering if it was possible to have users unlock achievements/badges by typing in a one-word unlock code
    into a widget or something on the site.

    If not, can this be added in a future update?

    I don’t know about anyone else,
    but I think it’d be a cool and useful feature to have! 🙂

    http://wordpress.org/extend/plugins/badgeos/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    I’ve consulted with one of the original devs for the plugin, and he laid out these steps, that I elaborated on a bit for more detail.

    1) create and register a custom widget that outputs a custom form to use.
    2) write function to listen to form submissions
    I’d recommend hooking onto the init hook, and checking right away for $_POST being set and a hidden field in the form being set. If not set, simply return and exit out of the function.
    3) run meta query to get post ID of connected meta value (if exists)
    You’ll need to register the meta field with the achievement for this to work.
    4) run badgeos_award_achievement_to_user()
    This function is defined in rules-engine.php and you’ll need to pass in the achievement ID and the intended user ID for it to work.

    Hopefully this helps get you on the right path.

    +1 I also need this function. As TC asked, will this be part of a future update?

    Would be a good addition but don’t think it would be used by too many people…

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    For those curious, we have this addon available for purchase

    https://badgeos.org/downloads/activity-codes/

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Feature request’ is closed to new replies.