1.6 Compatible: Simple Like System
You will need to change the javascript file so that it changes to an image when clicking rather than simply changing the text. The line you will need to change is this one:

PHP Code:
btn.text(data.buttonString); 

It should look something like this:

PHP Code:
if (data.buttonString === "Like") {
    
button.attr('src''like_image_url.png');
} else {
    
button.attr('src''unlike_image_url.png');

insertco and sn4g like this post
Reply
Hello euan,
Thanks for this awesome plugin, this made MyBB far more awesome

However I have a little problem
First, there is no notification on MyAlert when member get likes from other member
Second, the likes counter didn't show up on Private Message

How to fix this issue?

Thanks again Happy
Reply
The first is an odd one. Are you running MyAlerts 1.05 and do you have the alert type for likes enabled (in the use CP)? For the second, you shouldn't be able to like PM's as they are meant to be private - hence the lack of functionality Happy
Reply
Hi euan, thanks for your reply Happy

Yes, I use MyAlert 1.05 and have the options enabled in the CP.
For the second, I mean..in the user profile box (below the avatar), the likes counter didn't show up any number. When in the postbit it display "Likes: 200" for example, in the PM it display "Likes:" with no number on it.

Thanks Wink
Reply
For the profile, it should automatically add two new rows to the Forum Info box (see the below screenshot). The PM issue is a bug that I'll need to fix - thanks for alerting me to that Happy

[Image: hZ6E1TM.png]
Reply
(08-01-2014, 11:37 PM)euan Wrote:
(08-01-2014, 10:51 PM)sn4g Wrote: does this work with myalerts?

Sure does. It exclusively works with myAlerts - there's no other notification system when you receive a like.

i'm not getting any notifications through myalerts when a post is liked

not getting the option on control panel to select show 'likes' in myalerts

myalerts 1.05
simple likes 1.03

any directions to look for the problem?unsure if it's related to the like or alert plugin
Reply
(15-01-2014, 07:46 PM)euan Wrote: For the profile, it should automatically add two new rows to the Forum Info box (see the below screenshot).

I don't get this two rows on my forums
Can you give me the code to add these rows manually?

(15-01-2014, 07:46 PM)euan Wrote: The PM issue is a bug that I'll need to fix - thanks for alerting me to that Happy

Sure, you're always welcome Happy

(16-01-2014, 03:07 AM)lexicondevil Wrote: i'm not getting any notifications through myalerts when a post is liked

I got this problem too,
not getting any notifications through myalerts when a post is liked
Still don't know how to fix this Crying
Reply
(20-01-2014, 09:06 AM)Febian Wrote:
(15-01-2014, 07:46 PM)euan Wrote: For the profile, it should automatically add two new rows to the Forum Info box (see the below screenshot).

I don't get this two rows on my forums
Can you give me the code to add these rows manually?

(15-01-2014, 07:46 PM)euan Wrote: The PM issue is a bug that I'll need to fix - thanks for alerting me to that Happy

Sure, you're always welcome Happy

(16-01-2014, 03:07 AM)lexicondevil Wrote: i'm not getting any notifications through myalerts when a post is liked

I got this problem too,
not getting any notifications through myalerts when a post is liked
Still don't know how to fix this Crying

Sure. The code for the profile is as follows:

PHP Code:
{$postsLiked}
{
$likesReceived

It can be inserted anywhere you like, but this is what the template looks like here:

PHP Code:
<html>
<
head>
<
title>{$mybb->settings['bbname']} - {$lang->profile}</title>
{
$headerinclude}
</
head>
<
body id="home">
{
$header}
<
table border="0" cellspacing="{$theme['borderwidth']}cellpadding="{$theme['tablespace']}class="tborder">
<
tr>
<
td class="trow1">
<
table width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td class="trow1" width="75%">
<
span class="largetext"><strong>{$formattedname}</strong></span><br />
<
span class="smalltext">
({
$usertitle})<br />
{
$groupimage}
{
$userstars}<br />
<
br />
<
strong>{$lang->registration_date}</strong> {$memregdate}<br />
<
strong>{$lang->date_of_birth}</strong> {$membday} {$membdayage}<br />
<
strong>{$lang->local_time}</strong> {$localtime}<br />
<
strong>{$lang->postbit_status}</strong> {$online_status}
</
span>
</
td><td width="25%" align="right" valign="middle">{$avatar}</td></tr></table>
</
td>
</
tr>
{
$awaybit}
</
table>
<
br />
<
table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<
tr>
<
td width="50%" valign="top">
<
table border="0" cellspacing="{$theme['borderwidth']}cellpadding="{$theme['tablespace']}class="tborder">
<
tr>
<
td colspan="2" class="thead"><strong>{$lang->users_forum_info}</strong></td>
</
tr>
<
tr>
<
td class="trow1"><strong>{$lang->joined}</strong></td>
<
td class="trow1">{$memregdate}</td>
</
tr>
<
tr>
<
td class="trow2"><strong>{$lang->lastvisit}</strong></td>
<
td class="trow2">{$memlastvisitdate} {$memlastvisittime}</td>
</
tr>
<
tr>
<
td class="trow1"><strong>{$lang->total_posts}</strong></td>
<
td class="trow1">{$memprofile['postnum']} ({$lang->ppd_percent_total})<br /><span class="smalltext">(<a href="search.php?action=finduserthreads&amp;uid={$uid}">{$lang->find_threads}</a> &mdash; <a href="search.php?action=finduser&amp;uid={$uid}">{$lang->find_posts}</a>)</span></td>
</
tr>
<
tr>
<
td class="trow2"><strong>{$lang->timeonline}</strong></td>
<
td class="trow2">{$timeonline}</td>
</
tr>
{
$postsLiked}
{
$likesReceived}
{
$referrals}
{
$reputation}
{
$warning_level}
</
table>
<
br />
<
table border="0" cellspacing="{$theme['borderwidth']}cellpadding="{$theme['tablespace']}class="tborder">
<
tr>
<
td colspan="2" class="thead"><strong>{$lang->users_contact_details}</strong></td>
</
tr>
<
tr>
<
td class="trow1" width="40%"><strong>{$lang->homepage}</strong></td>
<
td class="trow1">{$website}</td>
</
tr>
{
$sendemail}
<
tr>
<
td class="{$bgcolors['pm']}"><strong>{$lang->pm}</strong></td>
<
td class="{$bgcolors['pm']}"><a href="private.php?action=send&amp;uid={$memprofile['uid']}">{$lang->send_pm}</a></td>
</
tr>
<
tr>
<
td class="{$bgcolors['icq']}"><strong>{$lang->icq_number}</strong></td>
<
td class="{$bgcolors['icq']}">{$memprofile['icq']}</td>
</
tr>
<
tr>
<
td class="{$bgcolors['aim']}"><strong>{$lang->aim_screenname}</strong></td>
<
td class="{$bgcolors['aim']}"><a href="javascript:;" onclick="MyBB.popupWindow('misc.php?action=imcenter&amp;imtype=aim&amp;uid={$uid}', 'imcenter', 450, 300);">{$memprofile['aim']}</a></td>
</
tr>
<
tr>
<
td class="{$bgcolors['yahoo']}"><strong>{$lang->yahoo_id}</strong></td>
<
td class="{$bgcolors['yahoo']}"><a href="javascript:;" onclick="MyBB.popupWindow('misc.php?action=imcenter&amp;imtype=yahoo&amp;uid={$uid}', 'imcenter', 450, 300);">{$memprofile['yahoo']}</a></td>
</
tr>
<
tr>
<
td class="{$bgcolors['msn']}"><strong>{$lang->msn}</strong></td>
<
td class="{$bgcolors['msn']}"><a href="javascript:;" onclick="MyBB.popupWindow('misc.php?action=imcenter&amp;imtype=msn&amp;uid={$uid}', 'imcenter', 450, 300);">{$memprofile['msn']}</a></td>
</
tr>
</
table>
</
td>
<
td><img src="{$theme['imgdir']}/pixel.gif" height="1" width="8" alt=""/></td>
<
td width="50%" valign="top">
{
$profilefields}
{
$signature}
{
$modoptions}
{
$adminoptions}
{
$buddy_options}
</
td>
</
tr>
</
table>
{
$footer}
</
body>
</
html

I'll have to look at the MyAlerts issue. myAlerts needs a couple of bugs fixing and changes finishing anyway which I'll try to devote this week to.
lexicondevil and J Greig like this post
Reply
I'm going to start using this plugin soon. It's simple and straight to the point. Don't get me wrong, I love G33K's Thank You/Like System, but it's just so big.
euan and lexicondevil like this post
Reply
(09-01-2014, 08:48 AM)euan Wrote: You will need to change the javascript file so that it changes to an image when clicking rather than simply changing the text. The line you will need to change is this one:

PHP Code:
btn.text(data.buttonString); 

It should look something like this:

PHP Code:
if (data.buttonString === "Like") {
    
button.attr('src''like_image_url.png');
} else {
    
button.attr('src''unlike_image_url.png');


Don't work for me, I change the .js but the button only show "Like"..
Reply