• Has anyone been able to get Q&A Lite working with Buddypress Achievements?

    I’m trying to figure out how to reward users for their questions/answers, and I thought these plugins would be perfect for that.

    My Problem…

    To add a new Achievement, that plugin triggers on a do_action. I can find only 1 do_action in Q&A Lite and it seems to be related to the admin.

    My Questions…

    Does the premium version use do_action? (i.e. Would buying the plugin fix my problem?)

    Has anyone got a suggestion about getting these plugins working together?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi Jason

    Achievements is my plugin. Taking a quick look at the Q&A plugin (lite), there are only 3 do_actions: handle_module_admin_requests, render_admin_navigation_tabs, render_admin_navigation_subs.

    This is pretty poor, as these few are pretty generic and don’t sound like any occur when something useful happens in the plugin. You’ll need to ask the dev team to add a full set of do_actions.

    Thread Starter Jason

    (@2xknight)

    Thanks for the response Paul.

    I’ve been lurking off an on for a while on the Buddypress forums, so this isn’t the first time you’ve helped me out. I decided to post the question here because it looked like the problem I was having was in the Q&A plugin.

    I doubt I’d get a warm response with a request for do_actions since I’m not a paying customer. (Not likely to become one without ’em though.) I’ll probably just leave things as is, because I can’t bring myself to ask ’em to re-write the plugin simply because it doesn’t fully fit my needs.

    That’s really too bad, because the Q&A/Achievement pairing would be a very powerful feature.

    Hiya folks!

    I doubt I’d get a warm response with a request for do_actions since I’m not a paying customer.

    Awww… we’re not so bad once ya get to know us 😉

    The full version doesn’t contain anymore do_actions but I’ve alerted the dev directly and he can comment further.

    We DO take very seriously the suggestions of our premium members, but we want them to be valuable for everyone in the community as well. Thanks for your feedback! 🙂

    Any specific places you’d like to see them?

    Thread Starter Jason

    (@2xknight)

    Wow thanks for the response, I might have to buy that plugin anyway. *L*

    These are all the places I can think of that it would make sense, since these would be actions that could accumulate and earn an achievement.

    • When a question is posted.
    • When a question is deleted.
    • When a answer is posted.
    • When a answer is deleted.
    • Voting up. (for the person voting)
    • Voting down. (for the person voting)
    • Reputation gained.
    • Reputation lost.

    When a question is posted.
    When a question is deleted.
    When a answer is posted.
    When a answer is deleted.

    These can be handled using standard WordPress hooks, namely ‘save_post’ and ‘delete_post’. You just need to check the post type: ‘question’ or ‘answer’.

    Voting up. (for the person voting)
    Voting down. (for the person voting)
    Reputation gained.
    Reputation lost.

    Same here: votes and reputation are stored as post/user custom fields. So, all the hooks inside wp-includes/meta.php are available. Just check for the ‘_up_vote’, ‘_down_vote’ and ‘_qa_rep’ meta keys.

    That’s the beauty of using the standard WordPress API. 😉

    @scribu Good idea. I was just integrating Q&A with @paul Gibbs arch-enemy plugin CubePoints with BuddyPress.

    In the Q&A file, there is a function named update_user_rep(). It recreates a Q&A user’s reputation from the ground up (not incrementally) and updates the database via update_user_meta.

    To integrate with CubePoints or Achievements, you have to know the change in reputation. I am going to try watching for the _qa_rep meta key, then do a get_user_meta for the old rep value, then subtract that old from the new rep to be saved, and finally add the result to the CubePoints total with cp_alterPoints and cp_log.

    Currently I have Q&A hacked up and working, but it’s never good to alter plugin code.

    subscribing to this thread … would really love to see an easy integration with Q&A and CubePoints

    I would like to second the suggestion/wish from @locomo . If there was a way to have a site-wide reputation score with the encouragement that cubepoints offers that would be fantastic. I see from @scribu that it looks like this type of functionality can be achieved – is there a walkthrough somewhere that the less-experienced could follow while (here’s hoping) the “easy integration” solution is being developed?

    Sorry.. to be clear, I am hoping to integrate the plugins to allow points tallying on ‘regular’ posts as well as forums posts, site actions, etc..

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Q&A Lite and Buddypress Achievements’ is closed to new replies.