Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
182 views
in Q2A Core by
Could you code a "who's online" block
Also two leaderboards:----

a--- Top 5 Askers

b--- Top 5 Repliers ( answerers isnt a word ) lol

We are also working on integrating our version with our main website database, havent looked at advanced version yet, just getting a feel for it. But would like to export users points values for use on pages outside of Q2A if possible.

Great work mate btw

1 Answer

+1 vote
by
For the user points thing, you can simply read them from the `qa_userpoints` table. Do a join on `qa_users` to get the usernames.

For example, to get the highest scoring users, run this query:
SELECT u.handle, p.points
FROM qa_users u, qa_userpoints p
WHERE p.userid=u.userid
ORDER BY points DESC

The user points table has all the various stats, which you could use to display those leaderboards if you wanted.
...