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

    (@tw2113)

    The BenchPresser

    Hello,

    This one kind of depends on how you’re envisioning the achievement process.

    The most out-of-box ways I can think of would be either the reviewed submission or the manual awarding. However, neither are necessarily automated, and aren’t exactly specific to roles.

    Thread Starter Georgeba

    (@georgeba)

    Let me get in-depth and explain what I was going to use it for.
    I have a community marketplace system, and there are different roles. I was going to make it so that each time your role changes, you get awarded a badge based on that role. Is there any code that I could use to make this automated?

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    None I know of for automation. There are too many scenarios to accommodate for to cover everything out of box. It is possible to create your own triggers though, as we’ve done in the extra extensions, so there’s at least some code to go based off of. It’s a matter of creating the trigger, creating a point where the trigger is executed, and checking for completeness to earn the achievement in question for the user that triggered it all.

    Thread Starter Georgeba

    (@georgeba)

    Too many scenarios?
    All I would be doing is checking the user role, and if it’s equal to __role__ then give user a badge

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Your example here would be one of many scenarios that we could cover with enough time and development.

    We still don’t have anything out of the box for this specific one. At best at the moment, I can put it as an enhancement issue on GitHub for us to review in the future.

    Thread Starter Georgeba

    (@georgeba)

    Ok, is there any other free plugins I could integrate to award badges on role?

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    None I personally know of. We don’t necessarily have a widespread developer base with their own 3rd party addons. If we do, I want them to come forward and make themselves known so that we can help promote them and add to the BadgeOS toolset for our users.

    For my own curiosity, how frequently will roles be changing for any given user? Is that role change an automated process as well?

    Thread Starter Georgeba

    (@georgeba)

    Roles Will be changing quite frequently, and the role change is an automated process

    Thread Starter Georgeba

    (@georgeba)

    I may have figured out a way, but is it possible to “give” points to a user with a snippet of PHP code or something?

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    We have https://badgeos.org/api/source-function-badgeos_update_users_points.html#29-66 available. Should match your need well enough for this part.

    Thread Starter Georgeba

    (@georgeba)

    Thanks! I also just may make a free extension for this!

    Thread Starter Georgeba

    (@georgeba)

    It’s in the progress, I’ll let you know when I’m done

    Where can I find the page to award a badge?

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Marina, you can award individual achievements to a user via their profile in the WP admin. You’ll need to be an admin user to see the section.

    Oh got it, thank you!

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘Awarding Badges Based on Role’ is closed to new replies.