-
Author
-
February 24, 2015 at 11:29 #47388superflymarketingParticipant
Hi guys,
How can we stop people from pressing the like button on a post many times? I’d like it to work so it’s one like per IP address.
How can this be done?
Cheers,
Nick
February 25, 2015 at 17:44 #47596sharmstrModeratorThat would take a complete rewrite. The code as it works now sets a cookie. To limit to ip address, you’d have to write it to the database.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
February 26, 2015 at 18:14 #47808superflymarketingParticipantno problem,
do I have to tick anything in the theme settings for the cookie to work?
Cheers,
Nick
February 26, 2015 at 18:53 #47819sharmstrModerator? No. Just turn on likes. If its not working, then maybe you have a conflict somewhere.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
February 27, 2015 at 11:18 #47953superflymarketingParticipantThe bug is on your theme demo. if you click multiple times to like a post the number increases. If you click, wait, and click again it doesn’t allow you.
Anyway of fixing this?
February 27, 2015 at 15:20 #47976sharmstrModeratorIts not really a bug. I doubt that 7th Queen anticipated people going crazy and clicking it multiple times quickly before the code had a chance to finish execution. I’ll assign this to abe to see if they can change the order of the code so that it disables further clicks soon in the code. Thanks.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
February 27, 2015 at 15:26 #47978superflymarketingParticipantYeah that’d be awesome!
If you could let us know what you amend we can implement it.
Cheers,
Nick
February 27, 2015 at 15:44 #47987sharmstrModeratorI doubt this will be the final code, but you can try this.
Go into theme options > misc and turn on dev mode. Then open up /kleo/assets/js/app.js. Around line 1081 you’ll see the likes function. After if(link.hasClass(‘liked’)) return false; add
COPY CODElink.addClass('liked');
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
March 11, 2015 at 16:29 #49689AbeKeymasterHi, that is a good solution until the next update where we have added a fix for that.
Thanks @sharmstr
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.March 11, 2015 at 22:05 #49792sharmstrModeratorThanks abe!
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The topic ‘How to reduce likes to one per IP’ is closed to new replies.