WordPress.org

Ready to get started?Download WordPress

Forums

Achievements for WordPress
[resolved] Question about achievement progress (5 posts)

  1. Peter Hudson
    Member
    Posted 1 year ago #

    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/

  2. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 1 year ago #

    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.

  3. Peter Hudson
    Member
    Posted 1 year ago #

    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.

  4. stwc
    Member
    Posted 1 year ago #

    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?

  5. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 1 year ago #

    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 :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.