Hi all - my 11 year old son and I were looking over the badges on my site and he pointed out that I should have received the EMPATHETIC badge for receiving 500 likes and giving 1000 likes. It appears I have not.
Has anyone else had this issue, or have a suggestion? Is the query working?
I was a bit surprised the badge query uses the posts table instead of the badge_posts view.
Anyway, try this
(you’ll need to know your id number)
-- [params]
-- int :the_user_id = 2
SELECT COUNT(posts.like_count) AS liked_posts
FROM posts
WHERE posts.user_id = :the_user_id
AND posts.like_count > 0
Yes, it might not be such a good idea to show the progress towards achieving a Trust Level, but I think revealing the criteria for most of the Badges would be harmless enough.
Or at least the criteria should be reasonably discoverable. If it’s so important, perhaps the “number of posts liked” should be one of the metrics shown on the user summary page.