1.6 Compatible: Simple Like System
I ran into a problem. The like feature works but the template variable is not auto inserting. I want it to show up on my postbit right below "Reputation".

I would really apprciate the help.

Thanks,
ALUX

http://www.carfanaticsforum.com/thread-24486.html
Reply
(22-05-2014, 11:44 PM)ALUX Wrote: I ran into a problem. The like feature works but the template variable is not auto inserting. I want it to show up on my postbit right below "Reputation".

I would really apprciate the help.

Thanks,
ALUX

http://www.carfanaticsforum.com/thread-24486.html

Hi, do you mean the like bar or the like count variable? If the latter, check this thread: http://www.mybbstuff.com/thread-1102.html
Reply
Hi euan, Just an idea. Is it possible to date and give the version number in the "latest download" on the OP?

[FIXED] the button is not showing for regular users. Only for Admin/Moderators. Not theme related (tested on mobile theme and PC theme). I'm lucky a friend told me about it, otherwise could have gone months like this. Have tried putting it in different <div> location (with author buttons), but no go.

*** Euan, sorry I'm not a plugin author or programming master. Probably this was in the documentation as well... Grin But why not include a setting in Simple like settings "Exclude Usergroups From Viewing: / Exclude Usergroups from Liking: ". Or at the very least set all usergroups to on by default.

Any way to get this moved up in line with the other buttons?
   
euan likes this post


Attached Files Thumbnail(s)
   
Reply
(18-03-2014, 07:14 PM)euan Wrote:
(18-03-2014, 09:23 AM)lexicondevil Wrote:
(09-03-2014, 03:27 PM)euan Wrote: [quote='lexicondevil' pid='1968' dateline='1394056414']
[quote='euan' pid='1884' dateline='1389220624']

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

still not getting any myalert notifications for post likes
no option in user CP to select likes
'likes' is set to yes under board settings>myalerts settings

the only alert it seems to work for is when receiving a PM?and then after reading the alert doesn't go away.

That's odd. I'll look into that but it certainly used to work.

myalerts 1.05
simple likes 1.4.0
Reply
Hi, great plugin, but i have a issue, button not show, only text, no css code "btn_like", see image (italian mybb). Thanks!
[Image: Simple_Like_System_no_button.png]
Reply
You'll have to manually add the CSS to style the button in your theme then I'm afraid.
Reply
Euan,

Can you tell me how to add the css so that there's a background behind the likes within the thread? Also, how would I change the colour of the text without changing it else where? Basically I'd like to set the colours with the plugins CSS of my theme (under its class).

Thanks
Reply
Great plugin, has a few downsides but they are easy to fix. I've noticed that many users has asked how to replace the text "Like" and "Unlike" with images, this is how I've done it.

1) Navigate to /inc/languages/english/ and open simplelikes.lang.php with your favourite text editor
[Image: UAnuhom.png]
2) Edit lines 8 and 9 to the following
PHP Code:
$l['simplelikes_like']   = '<img src="LINK_TO_YOUR_LIKE_PICTURE"/>';
$l['simplelikes_unlike'] = '<img src="LINK_TO_YOUR_UNLIKE_PICTURE"/>'
3) Change LINK_TO_YOUR_LIKE_PICTURE and LINK_TO_YOUR_UNLIKE_PICTURE to direct links to the png/jpg/gif or whatever the extension is.
PHP Code:
$l['simplelikes_like']   = '<img src="http://i.imgur.com/xbmjyef.png"/>';
$l['simplelikes_unlike'] = '<img src="http://i.imgur.com/VqDeMLI.png"/>'
4) Navigate to /jscripts and open like_system.js with your favourite text editor
[Image: rtk0V9X.png]
5) Edit line 66 to the following
PHP Code:
likeButton.html(data.buttonString); 
6) Navigate to /jscripts and open like_system.min.js with your favourite text editor
[Image: yeuxUNP.png]
7) CTRL + F i.text(e.buttonString) or try to find it manually and change i.text(e.buttonString) to the following
PHP Code:
i.html(e.buttonString
Here's a default like_system_min.js for image buttons if you were unable to find i.text(e.buttonString)
PHP Code:
!function(t,e,o){var i=this.MybbStuff=this.MybbStuff||{};this.MybbStuff.LikeSystem=function(t){var e,o=function(t,o){this.selector=t,this.postKey=o,this.VERSION="1.3.1",e=this};return o.prototype={constructor:o,init:function(){return t("body").on("click",e.selector,e.togglePostLike),e},togglePostLike:function(o){o.preventDefault();var i=t(this),s=i.attr("id").substr(16);return t.post("xmlhttp.php?action=like_post",{my_post_key:e.postKey,post_id:s},e.togglePostLikeSuccess,"json"),!1},togglePostLikeSuccess:function(e){if(e.errors)t.each(e.errors,function(t,e){e&&(console.log(e),alert(e))}),alert(e.error);else{var o=t("#post_likes_"+e.postId),i=t("#likeButton_post_"+e.postId);0!==o.length&&0!==e.likeString.length?o.html(e.likeString):0!==o.length?o.fadeOut("slow",function(){t(this).remove()}):t("#pid_"+e.postId).after(e.templateString),0!==i.length&&i.html(e.buttonString)}}},o}(t,window),t(e).ready(function(){var t=new i.LikeSystem("a[id^='likeButton_post_']",o);t.init()})}(jQuery,document,my_post_key); 
Cool Clear your cache since the javascripts are cached
Here's how

[Image: DtxHh0h.png]
[Image: lkBXy0J.png]
Enjoy!
Reply
Thanks for the in-depth guide Happy Should be useful to a lot of people!
Reply
Strangely this isn't working with our MyAlerts. Sad. Oh well that would've been nice.

Anyways;
Code:
{$likesReceived}

Is there a way to use that outside of a profile template? So; for example in our header for a user??
Reply