Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] MyLikes v1.0.1
#31
Understand Smile it is only a hobby. I am looking for your next release Smile Keep good work!
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#32
In the future there will be an integration with MyAlert, so as to have a notification when someone puts "I like" on your post? thanks

Sorry, other question, how can I delete round brackets " ( number of likes ) "? thanks
Reply
#33
There wasn't any planned integration, however I'll take a look as I agree that it'd be a good addition.

The brackets are located in the postbit_mylikes_button template.
Support PMs will be ignored!
Reply
#34
I tried to delete ( and ) in postbit_mylikes_button but then "I like" and "Unlike" doesn't work more, I think because there is link to javascript:

Quote:<span class="ilike"><a href="javascript:MyBB.popupWindow'/misc.php?action=likes&pid={$post['pid']}&uid={$post['uid']}';" id="liked_{$post['pid']}"><span class="mylikes_likes">{$likes}</span></a></span>
Reply
#35
Are you sure you've only deleted the brackets?
Support PMs will be ignored!
Reply
#36
Yes, only the brackets, "avascript" there is still but here on mybb community doesn't appear. I have pasted only code that I think has the brackets, in postbit_mylikes_button I have:

Quote:<span class="ilike"><a href="j avascript:MyBB.popupWindow'/misc.php?action=likes&pid={$post['pid']}&uid={$post['uid']}';" id="liked_{$post['pid']}"><span class="mylikes_likes">{$likes}</span></a></span> (is here ( number of likes ) )?

then

<a href="j avascript:addLike({$post['pid']}, {$post['uid']}, {$likes}, '{$success}', '{$delete}', '{$lang->mylikes_likes}', '{$lang->mylikes_like}', '{$lang->mylikes_unlike}');"><span id="like_{$post['pid']}" class="mylikes_like {$liked}">{$mylikes}</span></a>

First code (span ilike etc) is for number of likes (and where there are the brackets) ; Second code (from <a href= etc) is for I like / Unlike text, where I click to add / remove likes on posts.
Reply
#37
I knew of the javascript bug Wink Use code/php tags next time, then you won't have that.

The original template without brackets would be:
<a href="javascript:addLike({$post['pid']}, {$post['uid']}, {$likes}, '{$success}', '{$delete}', '{$lang->mylikes_likes}', '{$lang->mylikes_like}', '{$lang->mylikes_unlike}');"><span id="like_{$post['pid']}" class="mylikes_like {$liked}">{$mylikes}</span></a>
<a href="javascript:MyBB.popupWindow('/misc.php?action=likes&pid={$post['pid']}&uid={$post['uid']}');" id="liked_{$post['pid']}"><span class="mylikes_likes">{$likes} {$lang->mylikes_likes}</span></a>
Support PMs will be ignored!
Reply
#38
Hi, the problem is that when I refresh page, mylikes are ok:

[Image: kWNVfOp.png]

But when I click on "I like" or "Unlike", it changes and I have brackets Sad

[Image: MaKbHe1.png] and [Image: y98rY4s.png]

(it's same post in three different clicks)

Thank you in avance
Reply
#39
Open jscripts/mylikes.js and remove the brackets in line 35.
Support PMs will be ignored!
Reply
#40
Nothing, it doesn't work Sad  I tried from original $(id).text("("+(new_likes)+") "+lang_likes);


$(id).text("("+new_likes+") "+lang_likes); (it works but I have always the brackets)

$(id).text("+(new_likes)+ "+lang_likes); (when I click on I like / Unlike I see +(new_likes)+ I like)

$(id).text("+new_likes+ "+lang_likes); (when I click on I like / Unlike I see +new_likes+ I like)

$(id).text("+new_likes+") "+lang_likes; (unlike/I like doesn't work, there isn't toggle effect)

$(id).text("+new_likes+" +lang_likes); (when I click on I like / Unlike I see +new_likes+ I like)

$(id).text("+new_likes+" "+lang_likes); (unlike/I like doesn't work, there isn't toggle effect)

$(id).text("("+new_likes+")" +lang_likes);  (it works but I have always the brackets)

Sad I don't know, other combinations that I can try? Big Grin

Maybe the brackets are essential to work the plugin..
Reply


Forum Jump:


Users browsing this thread: 10 Guest(s)