How can I list liked posts ?

doli

New member
How can I list liked posts? I'd like to know what kind of posts people 'like', I know there are somes as it shows me likes in 'daily stats' but can't find a way to list them all ...
 
Code:
SELECT *
FROM  `xf_liked_content`
WHERE  `content_type` =  'post'

That should give you a list of posts that have been liked.

(Change content type to profile_post to find liked comments on profiles)

You can use an inner join to get the 'message' field of the post_id from the xf_post table
And another inner join to get the title of the thread to which that post belongs to.


select everything from first table, as a, using content_id, inner join second table, as b, using post_id, where a.content_type is post.

Soooooo, perhaps (untested)
Code:
SELECT *
FROM xf_liked_content a
INNER JOIN xf_post b ON a.content_id = b.post_id
WHERE a.content_type =  'post'

[edit]
I gave it a quick try,

php code: (stand alone, edit to point to your xenforo database)
http://dl.dropbox.com/u/693961/_liked_content.php

output:
Screen%20shot%202012-02-14%20at%205.15.48%20PM.png


note that bbcode etc isn't parsed, this is just 'brainstorming' and has no integration with the core engine of xenforo what so ever. but should get you started.
 
Top Bottom