Posts: 3,320
Threads: 192
Joined: May 2014
Reputation:
147
better to set a limit to every group (max likes per day)
Posts: 152
Threads: 17
Joined: Dec 2013
Reputation:
1
(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?
Posts: 3,320
Threads: 192
Joined: May 2014
Reputation:
147
Posts: 322
Threads: 60
Joined: Nov 2014
Reputation:
7
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&pid={$post['pid']}&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&pid={$post['pid']}&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>
Posts: 152
Threads: 17
Joined: Dec 2013
Reputation:
1
Is there a way (e.g. jquery) to see what's the POST with the most likes/thanks?
Please help. Thanks
Posts: 63
Threads: 7
Joined: Jan 2014
Reputation:
7
2014-12-11, 08:33 AM
(This post was last modified: 2014-12-11, 08:33 AM by cafeína.)
Gobe, you may see a few pages back.
Posts: 152
Threads: 17
Joined: Dec 2013
Reputation:
1
2014-12-11, 09:01 AM
(This post was last modified: 2014-12-11, 09:02 AM by Gobee129.)
(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-p...pid1091503
Does it work for you?
Posts: 25
Threads: 9
Joined: Feb 2011
Reputation:
0
2014-12-11, 05:20 PM
(This post was last modified: 2014-12-11, 05:21 PM by Typhome.)
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'])
Posts: 1,175
Threads: 26
Joined: Nov 2014
Reputation:
220
2014-12-11, 07:13 PM
(This post was last modified: 2014-12-12, 01:24 PM by SvePu.)
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:
Link to plugin: http://community.mybb.com/mods.php?action=view&pid=334
Posts: 3,320
Threads: 192
Joined: May 2014
Reputation:
147
(2014-10-14, 06:37 PM)Eldenroot Wrote: I just need these two changes:
- add "<br><br><hr>" before the list of users in classic postbin if the post is liked
- change image in thnk you/ike button (now I see a heart, I would like to see thumb up or anything else, I just need to know where to change it)
Anyone can help?
|