MyBB Community Forums
[1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Releases (https://community.mybb.com/forum-102.html)
+---- Thread: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) (/thread-59652.html)



RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - SAEED.M - 2014-05-06

Thanks a lot carliv.

this very useful for me.

Thanks. Wink


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - carliv - 2014-05-07

I'm glad for you! Smile


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - Cameron:D - 2014-05-08

Some users on my forum accidentally discovered a race condition which allows someone to like a post multiple times - there is a millisecond (or so) long window between checking for an existing like and inserting the like. Under the right conditions (The first few times it happened it was accidental) or with a flood of requests a post can end up with two likes from one user.

The solution was to change the index on (pid, uid) to a unique key as opposed to just a plain ol' index.

I've attached a patch for inc/plugins/thankyoulike.php so it will create the unique key on install.
[attachment=31553]

If you've already got it installed the following queries (changing table names where needed) will replace the index with a unique one:

ALTER TABLE `mybb_g33k_thankyoulike_thankyoulike` DROP INDEX `pid`;
ALTER TABLE `mybb_g33k_thankyoulike_thankyoulike` ADD UNIQUE INDEX `pid` (`pid`, `uid`);

Note that I've not yet worked on adding a graceful way of handling an error on the insert (It just throws an error and the user never gets a message saying the post was already liked).


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - freshpromo - 2014-05-29

(2014-02-11, 03:32 PM)Tallon Wrote: Also, the thanks are not appearing below the post to show that it has been thanked

I'm using a custom theme
I had this same issue with the Thanks system not appearing in the 2.0_Inspired theme at all.

In the Admin CP > Configuration > Thanks - I kept the last setting "Separate table" set to On.

Then in Templates & Styles > Templates > 2.0_Inspired (or your custom theme name) > Postbit Templates > postbit_classic - I added the following piece of code at the very end of the file after the closing table tag:

{$post['thxdsp_outline']}

This might not be the best way to accomplish this but it worked for me.


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - Eldenroot - 2014-05-30

How to use this mod with hide until thanks? Or is there any way? Thank you

http://community.mybb.com/thread-69096-page-3.html


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - MePiikan LzBolaz - 2014-06-09

(2013-10-28, 09:19 AM)Dannymh Wrote: I am having the issue with "loading" when clicking thank you on the mobile theme of my site the javascript seems to be correct. Works fine on the normal version of my site.

This was working fine until I upgraded to 1.6.11 and had to reinstall the script.

Any thoughts on this?

Cheers
Dan

####FIXED###

Had to add the postbit part. The script was looking for "</tbody>" but because the mobile theme uses div it was never placed.

Added it manually as divs instead of tr's/td's and it now works

This worked perfectly. Thanks


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - Whiteneo - 2014-06-09

@Eldenroot

There is a mod like this maded by me.

Thank You MyBB System + Re + MyAlerts

That mod includes hide tag and use AJAX and have more ots like this.


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - HeyyYouu - 2014-07-21

Any easy way to change "like" to something else like "Downloaded"?


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - rajeevrrs5 - 2014-07-22

i have installed this but it now showing in plugin area in mybb admin panel .


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - .m. - 2014-07-22

^ check (again) the installing instructions available at the plugin page

@HeyyYouu : this plugin's main purpose is to encourage the poster for the post content.
if like / thanks is changed to something else then the main purpose doesn't fulfill