ElkArte Community

Project Support => General ElkArte discussions => Topic started by: Jorin on July 29, 2014, 06:39:41 am

Title: More than one likes in a thread
Post by: Jorin on July 29, 2014, 06:39:41 am
Seems to be not possible, giving two ore more likes to different posts of the same author in one thread. :o
Title: Re: More than one likes in a thread
Post by: Spuds on July 29, 2014, 07:07:33 am
It should be possible ... Do you have the time / number limits set in the control panel? ( index.php?action=admin;area=featuresettings;sa=likes )   If so you could just be restricted due to that (adding to many likes in to short a time).
Title: Re: More than one likes in a thread
Post by: Jorin on July 29, 2014, 07:10:58 am
I can't change this. I have this problem here. ;) Wanted to like this post (http://www.elkarte.net/community/index.php?topic=1790.msg11222) and the first post (http://www.elkarte.net/community/index.php?topic=1790.0). But I can't.

Quote from: Spuds – ...(adding to many likes in to short a time).
No, can't like it with an hour difference between the first and the second try to like a post.
Title: Re: More than one likes in a thread
Post by: Spuds on July 29, 2014, 07:17:15 am
Just checked here and the settings are such that it should not have caused a problem ... I'll try to reproduce this on my local.
Title: Re: More than one likes in a thread
Post by: Jorin on July 29, 2014, 07:26:53 am
Thanks!
Title: Re: More than one likes in a thread
Post by: Spuds on July 29, 2014, 07:41:54 am
Tried several ways on my local setup and have not been able to reproduce it (yet)

When you try like that post, does the icon change to the + when you hover over it?  Does anything happen when you click on the like icon (please check your browser console to see if you are getting a JS error and if its posting what the Post response is)

Thanks
Title: Re: More than one likes in a thread
Post by: Jorin on July 29, 2014, 07:47:12 am
I get a "+" on hover, yes. I get an "javasript:void(0)" in the status bar too. When I click the like button, nothing happens. Browser is IE9 64Bit on Windows 7.

Oh... I tried to click on it with developer tools of IE open. It said I should refresh the site. I did, and now I liked the post! :o  Don't know what this was... :-X Sorry for the inconvenience. :-[
Title: Re: More than one likes in a thread
Post by: Spuds on July 29, 2014, 07:51:13 am
Well glad it finally worked  :)  I'll play around with IE9 a bit and see if we have some ajax / refresh issue.  Sounds as if it may have been liked but your browser never refreshed for some reason.  
Title: Re: More than one likes in a thread
Post by: [SiNaN] on July 29, 2014, 08:14:41 am
Is there are time limit set on this site? During my tests, I noticed that it won't give any warnings even if like/unlike has failed due to time limit and silently ignore the click. I expected it to throw some kind of warning.
Title: Re: More than one likes in a thread
Post by: Spuds on July 29, 2014, 10:01:30 am
Just took a look, its set to 10 likes in 1 minute.    I don't recall it having capability to displaying any type of "flood" waning but I'll take a look at that ajax handler to see what we can do (or if its there and simply not working or not used).

Any preferences if we should just give a quick slider notice up top or the more stop what you are doing modal box.
Title: Re: More than one likes in a thread
Post by: [SiNaN] on July 29, 2014, 11:14:44 am
I think slider notice would be good enough. It's not a huge issue.
Title: Re: More than one likes in a thread
Post by: Spuds on July 29, 2014, 01:05:26 pm
I fixed it in a PR I'm working on, the controller was failing to provide an "error" response when the limit was exceeded. 

Just to note, currently the ajax controller for likes has a modal box so thats what I used for hat error.   Providing a warning and an error method in our various ajax controllers may be a good thing for 1.1.
Title: Re: More than one likes in a thread
Post by: [SiNaN] on July 29, 2014, 03:58:18 pm
That sounds good. ;)
Title: Re: More than one likes in a thread
Post by: Jorin on September 23, 2014, 07:19:46 am
@Ruth  played Miss Marple the last days and experienced this, which I think I can testify 'cause it seems it's happening in both our boards, hers and mine:

You can like any post, this works well. Now it gets complicated. Puh. Remember ElkArte showing the numbers of likes in a thread on the board index? It seems that the count of likes on the board index only shows likes in threads you didn't start. If you start a thread it doesn't count the likes in this thread for yourself. Maybe others see the correct numbers, but you don't. And it seems it only counts +1 no matter how much likes a single post gets. And this seems to happen if you're logged in and logged out. Strange! :o
Title: Re: More than one likes in a thread
Post by: emanuele on September 23, 2014, 07:44:06 am
hmm...
Could be a "design choice".
On the board index only the "topic likes" (I've made up that name just now :P) are shown.
Now, the definition of "topic likes" is: the likes gives to the first message.

Let's make an example:
http://www.elkarte.net/community/index.php?topic=1958.0
Inside the topic you can see that several messages have likes, for a total of 18. The first message has 10 likes, and on the board index you see 10 likes.

Could it fit into what you are experiencing?
Title: Re: More than one likes in a thread
Post by: Jorin on September 23, 2014, 07:48:46 am
Yeah, possibly. That would explain why my index says no likes, but my test thread had four of them - but not in the first post.

What was the idea behind this design choice? For me (and Ruth) it's very confusing to see: "This thread has no likes" but when you enter it there are 5.

And: What about mark a topic as hot or very hot depending on the number of likes? So a thread with 10 likes would be marked as hot, but the index only counts 2 likes (for the first post)?
Title: Re: More than one likes in a thread
Post by: Ruth on September 23, 2014, 07:52:35 am
It means that "likes" given to replys are never counted to be displayed in the index?

What is about the "Hot Topics", if you choose the "likes" for them? Do the all need to get - for example - 20 likes on the first post in its thread?
Title: Re: More than one likes in a thread
Post by: emanuele on September 23, 2014, 08:20:07 am
As far as I know it's the way all the "likes" work: the likes of the "topic" are those given to the first message.

And it sort of make sense, let's say you open a topic with a message "I like chocolate" and 10 people gives a like, then within the answers someone writes "I hate chocolate" and this message receives 5 likes. It's not really correct to say the "topic" has received 15 likes, because only 10 people liked the "subject" of the topic, while 5 liked the opposite, but that was just a reply to the topic.
Title: Re: More than one likes in a thread
Post by: Ruth on September 23, 2014, 08:25:27 am
Yes...for this example I agree, emanuele... ;)

But:

If I ask a stupid question in the first message of a topic and you will give a clever and needful reply, and  10000 of users like your reply - then I think this topic should be a "Hot Topic".
Title: Re: More than one likes in a thread
Post by: Spuds on September 23, 2014, 03:37:17 pm
I've brought this behavior up a couple of times (and I'm responsible for it :P)

- The likes shown on the topic listing are for likes given to the topic, this being esoterically defined as likes on the very first post in a thread. 
- Other likes in a thread do not count towards the topic like, its only those given to the first post. 

QuoteShould that stay the way it is, to me is seems like the main counter is not going to move much, or should any like given go to the topic total and be shown on the main topic listing (where you can sort by likes)

I posed the above question sometime back and got good discussion both ways, so thats why it was not changed in 1.0.   I don't want to make it an option in the admin panel since its turning it on/off would require a round of maintenance on the db to reset /update the counts. 

It just comes down to what to folks really expect, what is the behavior on other forum systems that utilize like systems?
Title: Re: More than one likes in a thread
Post by: Ruth on September 23, 2014, 08:54:50 pm
Yes...I understand this, Spuds...I hope so. ;)

In my forums the replies are not less important than the first posts in topics. My members will not understand, why the likes they have given or received on replies are not shown in the boards. It had confused me this much, that I thought, this must be a mistake.

And I don't want to tell my members, that they should always like the first post of a topic, if they like the topic or some replies in it. ;) It's also not nice for those members, wich have written good and important replies.

So I think, I will change the "Hot Topics" back to the number of posts they have got...
And I will change the index in the boards, that the counter of the likes is not displayed at all, if this is possible?
Title: Re: More than one likes in a thread
Post by: Spuds on September 24, 2014, 09:59:29 am
Quote from: Ruth – Yes...I understand this, Spuds...I hope so. ;)

In my forums the replies are not less important than the first posts in topics. My members will not understand, why the likes they have given or received on replies are not shown in the boards. It had confused me this much, that I thought, this must be a mistake.

And I don't want to tell my members, that they should always like the first post of a topic, if they like the topic or some replies in it. ;) It's also not nice for those members, wich have written good and important replies.

So I think, I will change the "Hot Topics" back to the number of posts they have got...
And I will change the index in the boards, that the counter of the likes is not displayed at all, if this is possible?
Thanks for the feedback, I believe it will be a source of confusion for most.  The logic makes sense but people don't want to have to think about things like that, they just expect the counter to increase.

You will have to edit the template to remove the likes row from the message index, as long as likes are enabled, it will be shown.  So in MessageIndex.template find and remove (or comment out)
Code: [Select]
			// Show likes?
if (!empty($modSettings['likes_enabled']))
echo '<br />
', $topic['likes'], ' ', $txt['likes'];
Title: Re: More than one likes in a thread
Post by: emanuele on September 24, 2014, 10:33:09 am
Quote from: Spuds – what is the behavior on other forum systems that utilize like systems?
XenForo: first message are "topic likes".
WoltLab Burning Board: apparently first message are "topic likes".
vBulletin: apparently first message are "topic likes".
IPB: can't find any reference.
phpBB: I should install it, so it may take some time to test.
From what I can see most of them are doing the same thing as Elk (or Elk is doing the same thing as the others :P).

Write an addon to change that behaviour should not be too difficult, in fact is just a matter of increase the counter even if it's not a "first message", it would require some maintenance for consistency, that's true, but should be doable I guess.
Title: Re: More than one likes in a thread
Post by: Ruth on September 24, 2014, 08:09:53 pm
Thank you very much, Spuds. I will change it in MessageIndex.template ...or I will wait until an addon is written. ;)

I would prefer to have the number of all the likes in a topic for the "hot topics", it seems much better to me than the number of posts, as it had always been. Because the number of posts says very often nothing about the "quality" or importance of a topic, but the number of likes maybe can do this.
Title: Re: More than one likes in a thread
Post by: Ruth on May 04, 2016, 09:09:08 am
Quote from: emanuele – Write an addon to change that behaviour should not be too difficult, in fact is just a matter of increase the counter even if it's not a "first message", it would require some maintenance for consistency, that's true, but should be doable I guess.

I just want to ask, if someone has writen an addon? ;)