Posts: 152
Threads: 17
Joined: Dec 2013
Reputation:
1
(2014-09-19, 06:07 AM) Cameron:D Wrote: (2014-09-18, 11:01 PM) Gobee129 Wrote: Is there a way to show a list, e.g. a top 10, of the most liked posts?
Thx
http://community.mybb.com/thread-59652-p...pid1091437
Well I already told you I dont know how to use ur script.
http://community.mybb.com/thread-59652-p...pid1091503
Can anyone help please?
Posts: 3,320
Threads: 192
Joined: May 2014
Reputation:
147
2014-10-14, 06:37 PM
(This post was last modified: 2014-10-14, 06:43 PM by Eldenroot .)
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)
- change the order in postbin classic under avatar image I would like to have first: likes received and then likes given
Posts: 13
Threads: 2
Joined: Sep 2011
I am waiting for author's plugin update if working with My BB 1.8.x version.
Anyway, anyone using the plugin is working in
1.8.x or whatever?
Thank. BrendanWh
Posts: 101
Threads: 7
Joined: Jan 2010
Reputation:
3
2014-10-16, 08:02 PM
(This post was last modified: 2014-10-16, 08:05 PM by Maechlis .)
(2014-10-16, 05:02 PM) BrendanWheesk Wrote: I am waiting for author's plugin update if working with My BB 1.8.x version.
Anyway, anyone using the plugin is working in 1.8.x or whatever?
Thank. BrendanWh
It seems there's a bug in MyBB 1.8 that when you quote a post, you can't add anything from yourself to that quote... So quotes are only for the sake of repetition here lol
I wanted to say that the build by colleagues from Iran (see above) works fine in 1.8, only it was necessary to fix the templates (see my post above).
Posts: 3,320
Threads: 192
Joined: May 2014
Reputation:
147
It is working fine, just 3 changes and it works. But I need help how to change 2 things - see my post above
Posts: 10
Threads: 0
Joined: Oct 2013
Reputation:
2
Needed some Template changes for MyBB 1.8.
I used the Buttons from MyLikes System. May I can help you.
Attached Files
Thumbnail(s)
Posts: 3,320
Threads: 192
Joined: May 2014
Reputation:
147
It is amazing, Could you help me or send me your modified files? And I also really like the favorite thread button
Posts: 10
Threads: 0
Joined: Oct 2013
Reputation:
2
2014-10-20, 07:56 PM
(This post was last modified: 2014-10-20, 08:18 PM by AmaZe .)
(2014-10-20, 05:19 PM) Eldenroot Wrote: It is amazing, Could you help me or send me your modified files? And I also really like the favorite thread button
My solution is not really good, but It works for me...
template thankyoulike
<div class="float_left" style="vertical-align: top; padding-left: 5px; padding-right: 5px">{$lang->tyl_title}<span id="tyl_data_{$post['pid']}" style="{$tyl_data_display}">{$post['thankyoulike']}</span></div>
template thankyoulike_button_add
<a href="thankyoulike.php?action=add&pid={$post['pid']}&my_post_key={$mybb->post_code}" title="{$lang->add_tyl}"><span id="tyl_a{$post['pid']}" class="mylikes_like">Like</span></a>
template thankyoulike_button_del
<a href="thankyoulike.php?action=del&pid={$post['pid']}&my_post_key={$mybb->post_code}" title="{$lang->del_tyl}"><span id="tyl_a{$post['pid']}" class="mylikes_liked">Unlike</span></a>
template thankyoulike_classic
<div class="float_left" style="clear: both; padding-left: 5px; padding-right: 5px">{$lang->tyl_title}<span id="tyl_data_{$post['pid']}" style="{$tyl_data_display}">{$post['thankyoulike']}</span></div></div>
Change:
Change:
Change:
add to global.css
.mylikes_like {
background-image: url(../../../images/valid.png) !important;
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale");
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
}
.mylikes_liked {
background-image: url(../../../images/valid.png) !important;
filter: grayscale(0%);
-webkit-filter: grayscale(0%);
-moz-filter: grayscale(0%);
-ms-filter: grayscale(0%);
-o-filter: grayscale(0%);
}
change in thankyoulike.lang.php
$l['tyl_title_l'] = "<div class=\"float_left\" style=\"vertical-align: top; margin-bottom:10px\"><b>The following {1} {2} {3} {4}'s post:</b></span>";
This part sucks, but I don't know how to do this margin-bottom in the templates, because I don't want it when no one liked the post...
That should be all changes I did. I hope it works for you.
Best regards
The favorite button is this plugin:
http://mods.mybb.com/view/my-favourite-posts
(own modified for 1.8.x)
Posts: 97
Threads: 43
Joined: Sep 2014
Reputation:
0
(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>
Hello! i have updated thankyoulike.js file, but I could not found the the "thankyoulike_button_del" and "thankyoulike_button_add" files, please guide me where are these files located
Thanks
Posts: 152
Threads: 17
Joined: Dec 2013
Reputation:
1
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?