• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Like posts via MySQL

Is this possible because I noticed the like_users field is a blob in the database? I need a programmatic (PHP) way of adding a like to a post given 1 argument, which is the user_id.
Use XenForo_Model_Like::likeContent('post', $postId, $userLikingPost['user_id']);
Like records are inserted into xf_liked_content. The like_users field is cached data that is built from xf_liked_content.

I uploaded a script to this thread to rebuild that information if you want:

Thanks for the quick responses, that's pretty much what I wanted (a bit easier than I thought it would be too XD)