Is there any way to exclude certain forums from likes?

Lone Wolf

Well-known member
I have a chat forum which doesnt count towards a users posts but that doesnt stop them spamming each other with likes in that forum. Is there any way to switch likes off for a certain forum or to exclude that forum from the likes sytem?
 
Does anyone know how to run a query to remove all likes given in certain forums?

Rich (BB code):
DELETE lc.*
FROM xf_liked_content AS lc
LEFT JOIN xf_post AS p ON (p.post_id = lc.content_id)
LEFT JOIN xf_thread AS t ON (t.thread_id = p.thread_id)
WHERE lc.content_type = 'post'
AND t.node_id IN (1,2,3);

You need to specify the node_ids.

Then run this query to recalculate the like_count for all users (big query, might take some time):

Code:
UPDATE xf_user AS u
SET like_count = (
	SELECT COUNT(*)
	FROM xf_liked_content AS lc
	WHERE lc.content_user_id = u.user_id
	GROUP BY lc.content_user_id
);

This will correct the user like counts, but it won't correct the like counts in the posts themselves.
 
What would be nice if likes were still active but not counted. So you could show appreciation in the chat forum without it messing up the quality content likes count.
Use the Like extension thing ? But that might not work in just one forum ?

I think this need could make a nice addon.

How about a "Thanks" addon ? or a Smile addon ? or a Thumbs up addon ? ... as well strip out the LIKE button in that forum.

Maybe the word Like would be replace with a Thumbs up icon ... and clicking it would give a
You gave a Thumbs up to this.
 
Then run this query to recalculate the like_count for all users (big query, might take some time):

Code:
UPDATE xf_user AS u
SET like_count = (
	SELECT COUNT(*)
	FROM xf_liked_content AS lc
	WHERE lc.content_user_id = u.user_id
	GROUP BY lc.content_user_id
);

This will correct the user like counts, but it won't correct the like counts in the posts themselves.

Better solution to replace this step:

https://xenforo.com/community/threa...t-profile-post-like-caches.42384/#post-457352
 
Back
Top Bottom