Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: Butiks on April 12, 2023, 09:29:52 AM

Title: How to display the number of "likes" ?
Post by: Butiks on April 12, 2023, 09:29:52 AM
How to display the number of "likes" under the avatar in the topics on the forum?
As well as the number of "messages" under the user's avatar.

SMF v2.1.3
Theme: Default
Title: Re: How to display the number of "likes" ?
Post by: Arantor on April 12, 2023, 09:34:27 AM
First you'd need to add the ability for it to actually count the total - this isn't done in 2.1 partly for performance reasons but mostly because that encourages clique behaviours (there is a reason Twitter and Facebook don't show total likes for authors, same reason here)
Title: Re: How to display the number of "likes" ?
Post by: Doug Heffernan on April 12, 2023, 10:07:31 AM
Quote from: Butiks on April 12, 2023, 09:29:52 AMAs well as the number of "messages" under the user's avatar.

By number of "messages", do you mean users posts?
Title: Re: How to display the number of "likes" ?
Post by: Arantor on April 12, 2023, 10:08:10 AM
I'd assume he wants the number of liked messages a user has collected under the user avatar.
Title: Re: How to display the number of "likes" ?
Post by: Butiks on April 12, 2023, 10:22:36 AM
It is a pity that this is not provided in the standard set of forum functions.
All popular forums (PHPBB, XENFORO, IPS, etc) have this in their standard feature set.

I think that if each user displays his number of thanks under the avatar, this stimulates more and better for productive communication on the forum.
Title: Re: How to display the number of "likes" ?
Post by: Butiks on April 12, 2023, 10:30:49 AM
Quote from: Doug Heffernan on April 12, 2023, 10:07:31 AM
Quote from: Butiks on April 12, 2023, 09:29:52 AMAs well as the number of "messages" under the user's avatar.

By number of "messages", do you mean users posts?

See screenshot



The green line underlined what I want to add under the avatar
Title: Re: How to display the number of "likes" ?
Post by: Doug Heffernan on April 12, 2023, 10:52:11 AM
Quote from: Butiks on April 12, 2023, 10:22:36 AMIt is a pity that this is not provided in the standard set of forum functions.
All popular forums (PHPBB, XENFORO, IPS, etc) have this in their standard feature set.

I think that if each user displays his number of thanks under the avatar, this stimulates more and better for productive communication on the forum.

You can achieve it with a custom mod. You can put in a request at our Mod Requests board should you want to go that route and hopefully someone will code it for you.

https://www.simplemachines.org/community/index.php?board=79.0
Title: Re: How to display the number of "likes" ?
Post by: Arantor on April 12, 2023, 11:27:14 AM
Quote from: Butiks on April 12, 2023, 10:22:36 AMIt is a pity that this is not provided in the standard set of forum functions.
All popular forums (PHPBB, XENFORO, IPS, etc) have this in their standard feature set.

I think that if each user displays his number of thanks under the avatar, this stimulates more and better for productive communication on the forum.

It actually doesn't, though. What it promotes (just like karma before it) a weird culture of equating popularity with quality.

If this universe had any justice, I wouldn't be the most liked person on this forum. It certainly doesn't establish that anything I have to say is correct ;)
Title: Re: How to display the number of "likes" ?
Post by: Kindred on April 12, 2023, 02:22:09 PM
likes != thanks

Also, in this case, I am going to side with Facebook and Twitter -- which do not display a count of how many posts/tweets a user has liked.

I am going to go further and say that the "other popular forums" have it wrong -- mostly for the reasons that Arantor mentions.

In addition to all of that - because of the way we designed the Likes system, getting the count would be a fairly expensive query. Doing this would require a re-write of the SMF likes system.