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) - Gobee129 - 2014-11-07

Is there a way to remove likes??

I had this twice now that people just go on a like-spam and like every post in a thread... -.- 

How can I (as Admin) remove other user's likes? 


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

better to set a limit to every group (max likes per day)


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

(2014-11-08, 09:57 AM)Eldenroot Wrote: better to set a limit to every group (max likes per day)

I would have done that, but that option is not available in my ACP Settings for the plugin.

So how can I add it?^^ I wouldnt know the php code for it to add to the pluginfile. Do you have a solution?


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

unfortunately I dont


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

there is no file like " thankyoulike_button_del "

(2014-09-07, 06:09 PM)My-BB.Ir Wrote: If you want use it for 1.8 see this:

in "inc/plugins/thankyoulike.php" find:

"compatibility" => "14*,16*"
replace with:

"compatibility" => "14*,16*,18*"

and change "jscript/thankyoulike.js"  to this code:

var thankyoulike = {
 init: function()
 {
 },
 
 tgl: function(pid)
 {
 if(tylCollapsible == 1)
 {
 if($('#tyl_data_'+pid).is(':visible'))
 {
 $('#tyl_data_'+pid).hide();
 $('#tyl_title_'+pid).hide();
 $('#tyl_title_collapsed_'+pid).show();
 $('#tyl_i_expcol_'+pid).attr('src', $('#tyl_i_expcol_'+pid).attr('src').replace("collapse", "collapse_collapsed"));
 $('#tyl_i_expcol_'+pid).attr('alt', "[+]");
 $('#tyl_a_expcol_'+pid).attr('title', "[+]");
 }
 else
 {
 $('#tyl_data_'+pid).show();
 $('#tyl_title_collapsed_'+pid).hide();
 $('#tyl_title_'+pid).show();
 $('#tyl_i_expcol_'+pid).attr('src', $('#tyl_i_expcol_'+pid).attr('src').replace("collapse_collapsed", "collapse"));
 $('#tyl_i_expcol_'+pid).attr('alt', "[-]");
 $('#tyl_a_expcol_'+pid).attr('title', "[-]");
 }
 }
 },
 
 add: function(pid)
 {
 if(use_xmlhttprequest == 1 && tylEnabled == 1)
 {
 if(tylUser == 0)
 {
 return true;
 }
 //this.spinner = new ActivityIndicator("body", {image: imagepath + "/spinner_big.gif"});
 $.ajax('thankyoulike.php?ajax=1&action=add&pid='+pid+'&my_post_key='+my_post_key,
 {
 type: 'POST'
 }).done(function(data)
 {
 thankyoulike.addDone(data, pid);
 });
 document.body.style.cursor = 'wait';
 return false;
 }
 else
 {
 return true;
 }
 },
 
 addDone: function(data, pid)
 {
 if(typeof data == 'string' && data.match(/<error>([^<]*)<\/error>/))
 {
 message = data.match(/<error>([^<]*)<\/error>/);

 if(!message[1])
 {
 message[1] = "An unknown error occurred.";
 }

 /*if(this.spinner)
 {
 this.spinner.destroy();
 this.spinner = '';
 }*/
 document.body.style.cursor = 'default';
 alert(message[1]);
 }
 else
 {
 tylVisible = 2;
 if(tylCollapsible == 1 && $("#tyl_"+pid).css('display') != "none")
 { 
 if($('datatyl_data_'+pid).is(':visible'))
 {
 tylVisible = 1;
 }
 else
 {
 tylVisible = 0;
 }
 }
 $("#tyl_"+pid).html(data.tylData);
 $("#tyl_"+pid).show();
 $("#tyl_btn_"+pid).html(data.tylButton);
 if(tylCollapsible == 1)
 {
 if(tylVisible != 2)
 {
 if(tylVisible == 1)
 {
 $('#tyl_data_'+pid).show();
 $('#tyl_title_collapsed_'+pid).hide();
 $('#tyl_title_'+pid).show();
 $('#tyl_i_expcol_'+pid).attr('src', $('#tyl_i_expcol_'+pid).attr('src').replace("collapse_collapsed", "collapse"));
 $('#tyl_i_expcol_'+pid).attr('alt', "[-]");
 $('#tyl_a_expcol_'+pid).attr('title', "[-]");
 }
 else
 {
 $('#tyl_data_'+pid).hide();
 $('#tyl_title_'+pid).hide();
 $('#tyl_title_collapsed_'+pid).show();
 $('#tyl_i_expcol_'+pid).attr('src', $('#tyl_i_expcol_'+pid).attr('src').replace("collapse", "collapse_collapsed"));
 $('#tyl_i_expcol_'+pid).attr('alt', "[+]");
 $('#tyl_a_expcol_'+pid).attr('title', "[+]");
 }
 }
 }
 }
 
/* if(this.spinner)
 {
 this.spinner.destroy();
 this.spinner = '';
 }*/
 document.body.style.cursor = 'default';
 },
 
 del: function(pid)
 {
 if(use_xmlhttprequest == 1 && tylEnabled == 1)
 {
 if(tylUser == 0)
 {
 return true;
 }
 //this.spinner = new ActivityIndicator("body", {image: imagepath + "/spinner_big.gif"});
 $.ajax('thankyoulike.php?ajax=1&action=del&pid='+pid+'&my_post_key='+my_post_key,
 {
 type: 'POST'
 }).done(function(data)
 {
 thankyoulike.delDone(data, pid);
 });
 //new Ajax.Request('thankyoulike.php?ajax=1&action=del&pid='+pid+'&my_post_key='+my_post_key, {method: 'post', onComplete: function(request) { thankyoulike.delDone(request, pid); }});
 document.body.style.cursor = 'wait';
 return false;
 }
 else
 {
 return true;
 }
 },
 
 delDone: function(data, pid)
 {
 if(typeof data == 'string' && data.match(/<error>([^<]*)<\/error>/))
 {
 message = data.match(/<error>([^<]*)<\/error>/);

 if(!message[1])
 {
 message[1] = "An unknown error occurred.";
 }

 /*if(this.spinner)
 {
 this.spinner.destroy();
 this.spinner = '';
 }*/
 document.body.style.cursor = 'default';
 alert(message[1]);
 }
 else
 {
 tylVisible = 2;
 if(tylCollapsible == 1 && $("#tyl_"+pid).css('display') != "none")
 { 
 if($('datatyl_data_'+pid).is(':visible'))
 {
 tylVisible = 1;
 }
 else
 {
 tylVisible = 0;
 }
 }
 $("#tyl_"+pid).html(data.tylData);
 $("#tyl_"+pid).show();
 $("#tyl_btn_"+pid).html(data.tylButton);
 if(tylCollapsible == 1)
 {
 if(tylVisible != 2)
 {
 if(tylVisible == 1)
 {
 $('#tyl_data_'+pid).show();
 $('#tyl_title_collapsed_'+pid).hide();
 $('#tyl_title_'+pid).show();
 $('#tyl_i_expcol_'+pid).attr('src', $('#tyl_i_expcol_'+pid).attr('src').replace("collapse_collapsed", "collapse"));
 $('#tyl_i_expcol_'+pid).attr('alt', "[-]");
 $('#tyl_a_expcol_'+pid).attr('title', "[-]");
 }
 else
 {
 $('#tyl_data_'+pid).hide();
 $('#tyl_title_'+pid).hide();
 $('#tyl_title_collapsed_'+pid).show();
 $('#tyl_i_expcol_'+pid).attr('src', $('#tyl_i_expcol_'+pid).attr('src').replace("collapse", "collapse_collapsed"));
 $('#tyl_i_expcol_'+pid).attr('alt', "[+]");
 $('#tyl_a_expcol_'+pid).attr('title', "[+]");
 }
 }
 }
 }
 
/* if(this.spinner)
 {
 this.spinner.destroy();
 this.spinner = '';
 }*/
 document.body.style.cursor = 'default';
 }
}; 
$(document).ready(thankyoulike.init);

change "thankyoulike_button_add" template to this code:

<div id="tyl_btn_{$post['pid']}" class="postbit_buttons inline"><a href="thankyoulike.php?action=add&amp;pid={$post['pid']}&amp;my_post_key={$mybb->post_code}" onclick="return thankyoulike.add({$post['pid']}, {$post['tid']});" class="postbit_thank_add"><span>+ Thanks</span></a></div>

and change "thankyoulike_button_del" template to this code:

<div id="tyl_btn_{$post['pid']}" class="postbit_buttons inline"><a href="thankyoulike.php?action=del&amp;pid={$post['pid']}&amp;my_post_key={$mybb->post_code}" onclick="return thankyoulike.del({$post['pid']}, {$post['tid']});" class="postbit_thank_del" title="{$lang->del_tyl}"><span>- Remove thanks </span></a></div>



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

Is there a way (e.g. jquery) to see what's the POST with the most likes/thanks?

Please help. Thanks Smile


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - cafeína - 2014-12-11

Gobe, you may see a few pages back.


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - Gobee129 - 2014-12-11

(2014-12-11, 08:33 AM)cafeína Wrote: Gobe, you may see a few pages back.

If you refer to the "top 100 likes script", then my answer to that hasnt changed ever since: http://community.mybb.com/thread-59652-post-1091503.html#pid1091503

Does it work for you?


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - Typhome - 2014-12-11

Anyone know how configure that users can also like/thank those closed threads? Only administrators/moderators can like/thank.

I've tried this one solution (at ..60 page) - it shows thank/like button but it wont work.


if(($tyled && $mybb->settings[$prefix.'removing'] != "1") || (!is_moderator($post['fid'], "caneditposts") && $mybb->user['uid'] == 0) || $post['uid'] == $mybb->user['uid'])



RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - SvePu - 2014-12-11

Hi there,

I've made a Toplist addon for this nice TYL plugin.

Currently it is in status "Pending approval" but here are some screenshots:

[attachment=33261] [attachment=33262]

Link to plugin: http://community.mybb.com/mods.php?action=view&pid=334