Reputation Plugin Version 0.2

I would look into getting the Likes Given count from one of the tables instead of an AJAX request. If for only your own site, it might not be a problem. But it is possible for a site to set the Summary page to logged in only, which could cause a problem.

AFAICT there are 3 tables that have Likes Given counts.

One is directory_items.likes_received (the Users page) but that can also be logged in only, and it has various period_type’s

Another is user_stats.likes_received (the Summary page)

The other is user_actions.action_type where user_actions.action_type = 2
and it would need to do a COUNT query.

1 лайк