XF 1.2 How does XF calculate a user's total number of likes received?

Gene

Member
What exactly is being counted when XF generates the "likes received" figure for a user's profile or for the notable members list? As many ways as I try and pull this figure out of the DB, it seems I come up with numbers that are a few dozen likes higher for many users than XF is reporting. Note that this isn't true for all users - my own account, for example, has not received any of these "mystery" likes, while my most prolific users (~1500 total likes) have received up to 50 or so likes that XF is ignoring when it spits out its figures.

So, ultimately, I'm wondering how XF calculates the 'total likes' figure, and where I can find this routine in the code, so that I might do the same using SQL queries.

For reference: The thread that spawned this question.
 
Last edited:
Does anyone on the team here have any idea how, when, and where XF generates the like_count column in xf_user?
Your question has been answered several times already, including by Mike. It gets adjusted in several places across the code, there isn't a central location.

Your problem will probably be solved by running the script Jake posted, rather than by fiddling about with the code.
 
Your question has been answered several times already, including by Mike. It gets adjusted in several places across the code, there isn't a central location.

Your problem will probably be solved by running the script Jake posted, rather than by fiddling about with the code.
Indeed. The conversation continued after this post in the thread for that script.
 
Wait, so likes are stored in 3(?) separate locations? I get it's "cached" in the user table, but it sounds like it's also in a few others too according to @Gene's posts.
 
Top Bottom