• Resolved envieme

    (@envieme)


    Hello I use Q2A forum software integrated with wordpress user database which has it’s own points system. Also I am using mycred on the buddypress instalation.

    I need to be able to sync the points generated at Q2A site with the users buddypress points.

    Am thinking of a few ways of doing this. Please let me know which one is the best:

    1) Write mycred hooks in q2a for all actions (but this is going to be difficult as q2a is not in wordpress plugin but a seperate DB just sharing wp users table)

    2) write a cron to periodically (say daily) sync both the points as one. That is q2a has same points as mycred and vice versa

    3) q2a points are kept seperate and q2a points generated are added to mycred points somehow

    I would like to have it as 3,2,1 in order of preference. How to accomplish this?

    https://wordpress.org/plugins/mycred/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author myCred

    (@designbymerovingi)

    Hey.

    Do you know where Q2A stores your users point balances? Is it in the yourprefix_usermeta table?

    Thread Starter envieme

    (@envieme)

    Hello Gabriel,

    Thanks for this great plugin. I bought an addon to support your work though I don’t need now 🙂

    qa_userpoints is the table and is seperate from wp tables. The link is the coloumn userid which is same as wordpress.

    Plugin Author myCred

    (@designbymerovingi)

    I hope you forgive me for all these questions but I never used Q2A before.

    Ok so this qa_userpoints table is in a different database from your wp_usermeta table right? See if both tables were in the same database, option 2 would be best since then you can just “sync” the two tables and update balances because myCRED will save your balance in your user meta table.

    Thread Starter envieme

    (@envieme)

    No. qa_userpoints table is in the same database. just another table. it has a column userid which corresponds to user_id in wp database.

    Plugin Author myCred

    (@designbymerovingi)

    Ok in that case I would definitely go with option 2. A daily cron job that syncs the two tables could be achieved with relatively little code.

    Thread Starter envieme

    (@envieme)

    Thank you for helping with my doubt, I have started doing 2 as you said, looks like that’s the best option. I have a couple of more questions. Will open a new thread.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Sync points from another DB’ is closed to new replies.