WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Question about achievement progress

[Resolved] Question about achievement progress

  • I was wondering how progress was counted towards an achievement. To be more specific (although the same could apply to comments etc) I will use posts as an example.

    If I set up achievements to trigger at 10, 20 and 30 posts…I’m assuming this would track 10 then award first achievement. 2nd achievement would have 10 tracked and would continue to 20 before triggering etc.

    Am I right in assuming that this makes it difficult to use these types of triggers to then add, at a later date, an award that triggers at 50 posts, because that will start counting from 1 again.

    OR, does it use the authors post count to trigger the event – in which case, I’m very very wrong and that’s all good (same with comments etc)

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Paul Gibbs
    BuddyPress Lead Developer

    @djpaul

    If I set up achievements to trigger at 10, 20 and 30 posts…I’m assuming this would track 10 then award first achievement. 2nd achievement would have 10 tracked and would continue to 20 before triggering etc.

    Correct.

    Am I right in assuming that this makes it difficult to use these types of triggers to then add, at a later date, an award that triggers at 50 posts, because that will start counting from 1 again.

    Also correct!

    It doesn’t use the approach of (for example) counting authors posts, because that could easily be pretty slow, and make the code much more complex for relatively little benefit.

    A long term goal is to have a kind of “sync” button somewhere, so that it would go through and count up everything in the database, and award anything that you’ve already unlocked. But it would be an action that the site admin would trigger as this would be quite intensive on the database.

    Thanks for the reply Paul, I figured as much. That’s a shame. It does mean you need to anticipate a lot right from the sites inception (which you would have to anyway but it makes it difficult to extend if needed).

    A database sync would be a very good solution – it would mean that things could be added later at least.

    Thinking about my other post I envisioned sort of ‘stacking’ badges if this was the case – so achieve 10 posts, then the achieve 20 posts would be has achieved 10 posts and then posted another 10, if you get the idea. This would mean if you’d topped out achievements at 100 posts, but then a user reaches that figure when you hadnt anticipated it, you could add another achievement which is achieved 100 posts and then added another 50.

    Anyway, many thanks for taking my questions. Keep up the excellent work.

    I’d really like to see this — one way to do it would be to add the possibility of ‘count starting at x event’ when creating a new achievement, so if you wanted to add a 200 posts achievement down the line, having already made a 100 posts one earlier, you could create the 200 posts achievement but tell it to start counting at 101.

    Does that make sense?

    Plugin Author Paul Gibbs
    BuddyPress Lead Developer

    @djpaul

    Yeah. I’m not sure it’s worth adding a UI option for that in the core plugin (I’ll think about it), but it might make a good plugin plugin 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Question about achievement progress’ is closed to new replies.