SMF® Unofficial Help Forum

2.0.* Support => Modifications => Topic started by: Illori on February 28, 2013, 09:33:41 PM

Title: SMF Likes Plus
Post by: Illori on February 28, 2013, 09:33:41 PM
We now have a Likes mod.

(http://smfhelp.org/docimages/like_button.jpg)

(http://smfhelp.org/docimages/like_post.jpg)

You can Like or Unlike each post but a post that you make.

If more then 5 people have liked a post it will not show the names to save space.

Be sure after the mod is installed to set the permissions for which groups can like the posts. If you want a board to not have likes you would need to create a Permissions Profile (http://smfhelp.org/index.php?page=Permission-Profiles) to deny/disallow the liking in that board.


(http://i.creativecommons.org/l/by-nc-nd/3.0/88x31.png) (http://creativecommons.org/licenses/by-nc-nd/3.0/)
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License (http://creativecommons.org/licenses/by-nc-nd/3.0).
Title: Re: SMF Likes Plus
Post by: Dzonny on March 05, 2013, 12:36:25 PM
Thanks  Illori, works great! :)

Title: Re: SMF Likes Plus
Post by: Illori on March 05, 2013, 01:41:42 PM
great to hear.
Title: Re: SMF Likes Plus
Post by: Sully on March 14, 2013, 11:41:50 AM
Is there a reason my post was deleted? First of all, I had a valid question - because I'm curious as to who writes the modifications for this team. Second of all, which is the more surprising and actually slightly concerning reason that my post was deleted, is because I said that there are valid issues with the way this modification loads its resources.

Somewhat astounding to me that you'd ignore someone helping and then remove their post so no one else see's the truth.

The efficiency with this modification isn't something to be ignored, it could cause some big problems on larger boards in regards to performance.
Title: Re: SMF Likes Plus
Post by: Arantor on March 15, 2013, 11:19:44 AM
Not that it's any of your business who writes the modifications, but Illori did a lot of the ground work, and I helped out because I'm nice.

Quote
because I said that there are valid issues with the way this modification loads its resources.

There are valid issues, no disagreement, but they are actually the least worst alternative. I did exactly the same thing in Wedge for exactly the same reason, in fact.

It's really straightforward: if you do it any other way, you are pretty guaranteed to give some users a bad experience in some shape or form. Because caching isn't an answer here.

To explain: normally when you update something you generally want to play clearing the cache, especially if the user who has just done something wants to see that it has been done - in this case, liking a post, you *really really* want to show them that they've liked it.

Except you cannot flush the cache from the like call itself for the simple reason that you cannot guarantee what you will be flushing, unless you cache every like for the entire topic, because that's the only way you can do it.

If you cache by the list of messages, that's fine right up until users can view the page with different numbers of messages, since it's an option in their profile. So you will at some point be using stale data or being inconsistent with what you do show. At Facebook scale, inconsistent data is fine, but on a smaller scale, it's not acceptable.

If you cache by page number, you're going to have incomplete data depending on who happens to be rebuilding the cache, it may have more or less data than what other users need.

Quote
Somewhat astounding to me that you'd ignore someone helping and then remove their post so no one else see's the truth.

Just like removing bad reviews to your products, eh?

Quote
The efficiency with this modification isn't something to be ignored, it could cause some big problems on larger boards in regards to performance.

Oh yes, that's a valid point. And for those, a customised caching solution would be implemented. Folks with big boards will have invariably forced the posts per page, meaning it's possible to implement sane caching with this.

Oh, and actually, we have this running on wedge.org in a slightly modified form (since that's where I got the code from originally after I'd worked it all out and benchmarked it) and it's working just fine. I realise that 30k posts isn't a huge forum but it's actually large enough for testing - most people with 100k+ forums have enough going on that they don't really need to add this anyway.
Title: Re: SMF Likes Plus
Post by: BGH on March 19, 2013, 09:26:28 AM
Works great Illori, thanks!

Is there a way to cut off the list of users who liked the post "the way Facebook does"? (example: "testuser1, testuser2, testuser 3 and 5 others like this", maybe adding a popup showing all people who likes).

I know it might not be the purpose of this mod, but could be a nice addition ;D.


 :-X My bad, sorry. Didn't read the first post where it states:

If more then 5 people have liked a post it will not show the names to save space.

Could it be posible to add a popup box showing all likes, though?

Thanks in advance!

Cheers!
Title: Re: SMF Likes Plus
Post by: Illori on March 20, 2013, 06:12:45 AM
at this time to show the additional names in a popup is beyond my coding skills but i will see what can be done.
Title: Re: SMF Likes Plus
Post by: BGH on March 20, 2013, 01:29:01 PM
Ok, thank you :D. I'm thinking that one posibilty could be to add all the names in a preview tooltip (don't know if that's the proper way to call it), so it shows the preview up when hovering the "like.png" image, for example. But I'm not sure if this is entirely posible, though.

Another thing: Would it be posible to add a profile link to the usernames those who liked? For example:

Quote
2 Likes BGH (http://url_to_BGH_profile), testuser (http://url_to_testuser_profile) like this

Though, if I'm not mistaken, that'll make the query a bit heavier.

And thank you again for this mod, I made it to look similar to VB's likes system, so it's proven to be very customisable :D.

Best Regards.
Title: Re: SMF Likes Plus
Post by: Arantor on March 22, 2013, 11:51:53 AM
Quote
Though, if I'm not mistaken, that'll make the query a bit heavier.

It makes precisely zero difference whether you're making a link out of it or not in terms of queries - you already have to query to fetch the name, and if you have a name, you can just fix up a link out of it.

There is an updated version in testing which includes that, a couple of other minor presentation things (namely '1 Likes' getting fixed) and just for fun there's also a popup. Presentation on that is not entirely the best but there's something of a limit to what can be done in SMF's help popup.
Title: Re: SMF Likes Plus
Post by: Illori on March 22, 2013, 12:22:31 PM
new version attached to the first post. let me know if you run into any issues.
Title: Re: SMF Likes Plus
Post by: BGH on March 23, 2013, 06:09:34 AM
Awesome, excellent work! I've been playing with it for a short time, and came to love it  ;D.

There is an updated version in testing which includes that, a couple of other minor presentation things (namely '1 Likes' getting fixed) and just for fun there's also a popup. Presentation on that is not entirely the best but there's something of a limit to what can be done in SMF's help popup.

I was more thinking on a DIV centered little box, but that does the job done too. Can you please point me out where I can edit the popup style if possible?

Thanks for all your dedication, people! :D
Title: Re: SMF Likes Plus
Post by: Illori on March 23, 2013, 06:13:43 AM
styling the popup is a bit of an issue, doing it right would basically require a new template. currently it is reusing the help popup. i may look into doing this in the future but i am not sure it is going to happen.
Title: Re: SMF Likes Plus
Post by: BGH on March 23, 2013, 06:23:41 AM
Ok, thank you, Illori, but as I said it just does the job done. :D

Will try to modify the table style, though.

Best regards.
Title: Re: SMF Likes Plus
Post by: Illori on March 23, 2013, 07:37:15 AM
it may be useful to others if you could post your edits to the mod.
Title: Re: SMF Likes Plus
Post by: BGH on March 23, 2013, 09:30:24 AM
Sure, this is what I did so far (though, it's a bit raw):



In Likes.php:

Find:

Code: [Select]
global $context, $txt, $smcFunc, $memberContext, $modSettings;
Replace with:

Code: [Select]
global $context, $txt, $smcFunc, $memberContext, $modSettings, $scripturl;
Find:

Code: [Select]
$context['page_title'] = count($likers) == 1 ? $txt['likes_popup_1'] : sprintf($txt['likes_popup_n'], comma_format(count($likers)));
$context['help_text'] = $txt['likes_popup_liked'];

$context['help_text'] .= '<table style="width: 100%">';
foreach ($likers as $liker)
{
loadMemberContext($liker);
$context['help_text'] .= '<tr><td>' . $memberContext[$liker]['name'] . '</td><td class="ava">' . $memberContext[$liker]['avatar']['image'] . '</td></tr>';
}
$context['help_text'] .= '</table>';

Replace with:

Code: [Select]
$context['page_title'] = count($likers) == 1 ? $txt['likes_popup_1'] : sprintf($txt['likes_popup_n'], comma_format(count($likers)));
$context['help_text'] = '<div style="text-align:center;margin:10px 0">' . $txt['likes_popup_liked'] . '</div>';

$context['help_text'] .= '<table style="width:100%;border-top:1px solid #ccc;border-bottom:1px solid #ccc;padding:10px 0" cellpadding="7">';
foreach ($likers as $liker)
{
loadMemberContext($liker);
$context['help_text'] .= '<tr><td class="ava" style="text-align:center">' . $memberContext[$liker]['avatar']['image'] . '</td><td><a href="' . $scripturl . '?action=profile;u=' . $liker . '" target="_blank" title="' . $txt['profile_of'] . ' ' . $memberContext[$liker]['name'] . '">' . $memberContext[$liker]['name'] . '</a></td></tr>';
}
$context['help_text'] .= '</table>';

Result snippet:

(http://i.imgur.com/N62mXdn.png)
Title: Re: SMF Likes Plus
Post by: Illori on March 24, 2013, 09:06:55 PM
looking at your code you put in
Code: [Select]
$context['help_text'] .= '<div style="text-align:center;margin:10px 0">' . $txt['likes_popup_liked'] . '</div>';
this should be

Code: [Select]
$context['help_text'] = '<div style="text-align:center;margin:10px 0">' . $txt['likes_popup_liked'] . '</div>';
also you need to add $scripturl to the globals
Title: Re: SMF Likes Plus
Post by: BGH on March 25, 2013, 03:59:44 AM
Done, and edited previous post.

Regards.
Title: Re: SMF Likes Plus
Post by: Illori on March 25, 2013, 11:28:03 AM
i have an updated version with the change for the popup under review, it should be posted in the next few days ideally.

(http://imageshack.us/a/img824/3964/image019pk.png)
Title: Re: SMF Likes Plus
Post by: BGH on March 25, 2013, 03:15:15 PM
Looks very cool, Illori. Looking forward to the update :).
Title: Re: SMF Likes Plus
Post by: meetdilip on March 25, 2013, 08:56:50 PM
Nice mod Illori. Currently using Nibogo's. Will give it a try, water the mod, make it grow with more features. All the best.

PS : New theme is cool.
Title: Re: SMF Likes Plus
Post by: Illori on March 25, 2013, 09:09:25 PM
i have no plans to add more features and you have not even suggested any to be added so where would any ideas come from?

it has taken a while to get the mod to this point and i really dont see the point in adding more features that will just add bloat to the mod. there most likely will be only 1 version more released unless bugs are found and that will be it.

you are lucky this is not a paid mod, and even if it was that does not guarantee that new features would be added.
Title: Re: SMF Likes Plus
Post by: meetdilip on March 25, 2013, 10:23:06 PM
It is a good work, though I am looking for features like

1. No. of likes received in user info

2. Notifications when like or quote is made

3. Sidebar for recently liked posts.

I am not expecting you to do these. Just mentioned coz you told I didn't specify any features.
Title: Re: SMF Likes Plus
Post by: Illori on March 26, 2013, 05:34:47 AM
well none of those will be features of this mod.
Title: Re: SMF Likes Plus
Post by: meetdilip on March 28, 2013, 06:39:05 AM
No issues. Just suggestions can take or leave :)
Title: Re: SMF Likes Plus
Post by: Illori on March 29, 2013, 02:52:52 PM
new version attached to the first post.
Title: Re: SMF Likes Plus
Post by: BGH on March 29, 2013, 07:30:08 PM
Already testin' it and lovin' it. Awesome job! ;D

One issue I might point out, though, is that when you click on the more people, you get to see the "people liked popup". That's perfectly fine. Now, when you login, it redirects you to the popup action: index.php?action=like;display;topic=1;msg=1. It's not a big deal, but just wanted to let you know about it.

Otherwise, awesome work, as I said before.

Thanks for this big input, Illori (& Alestes?)! :D
Title: Re: SMF Likes Plus
Post by: Illori on March 29, 2013, 08:30:36 PM
i believe that is a feature of smf, not too much that can be done about it unless you dont allow guests to view the likes in each post.
Title: Re: SMF Likes Plus
Post by: BGH on March 31, 2013, 08:13:20 PM
i believe that is a feature of smf, not too much that can be done about it unless you dont allow guests to view the likes in each post.

How do you do that, in a clean way? I mean, this is what I did:

In Display.template.php, I edited this line:

Code: [Select]
echo implode(', ', $names), ' ', $txt['likes_and'], ' ', comma_format($array_length - 5), ' ', sprintf($txt['likes_more'], $scripturl . '?action=like;display;topic=' . $context['current_topic'] . ';msg=' . $message['id'], sprintf($txt[$array_length == 1 ? 'likes_popup_1' : 'likes_popup_n'], $array_length));

... to this:

Code: [Select]
echo implode(', ', $names), ' ', $txt['likes_and'], ' ', comma_format($array_length - 5), ' ', $context['user']['is_guest'] ? sprintf($txt['likes_more2'], $scripturl . '?action=login') : sprintf($txt['likes_more'], $scripturl . '?action=like;display;topic=' . $context['current_topic'] . ';msg=' . $message['id'], sprintf($txt[$array_length == 1 ? 'likes_popup_1' : 'likes_popup_n'], $array_length));

And added this to the Modifications.english.php file:

Code: [Select]
$txt['likes_more2'] = '<a href="%1$s">more people</a> like this.';

I like it, but it's a bit raw, so I'm asking if you know a 'clean way' of doing this.

Regards.
Title: Re: SMF Likes Plus
Post by: Illori on April 01, 2013, 06:15:51 AM
if that works that is fine, you could also wrap the whole display area for showing the likes in if !$context['user']['is_guest'] then you dont need the extra language string.

and actually if you are to stop the guests from viewing the likes in the popup something like might work...

Code: [Select]
echo implode(', ', $names), ' ', $txt['likes_and'], ' ', comma_format($array_length - 5), ' ', $context['user']['is_guest'] ? $txt['likes_more2'] : sprintf($txt['likes_more'], $scripturl . '?action=like;display;topic=' . $context['current_topic'] . ';msg=' . $message['id'], sprintf($txt[$array_length == 1 ? 'likes_popup_1' : 'likes_popup_n'], $array_length));
Code: [Select]
$txt['likes_more2'] = 'more people like this.';
i think that looks cleaner for guests then clicking the link and being sent to the login page, which is not an expected result.
Title: Re: SMF Likes Plus
Post by: frostybore on April 01, 2013, 01:20:03 PM
Just installed this on my 2.0.4 board -- works GREAT -- though the CSS in IE10 is broken. Alignment / padding issues, and the image doesnt show up next to "Like / Unlike"

Looks just fine on Chrome and FireFox of course.

GREAT job, thank you either way.
Title: Re: SMF Likes Plus
Post by: Illori on April 01, 2013, 01:31:14 PM
there is no reason the css should be broken in IE the image next to like/unlike is normal css so it should show in any browser without issue.

i dont have IE 10 but in IE9 the image next to the like/unlike shows up just fine.
Title: Re: SMF Likes Plus
Post by: frostybore on April 01, 2013, 01:42:34 PM
You're right -- I think it was a cache issue. It looks just fine on IE10 now.
Title: Re: SMF Likes Plus
Post by: Illori on April 01, 2013, 01:51:30 PM
good to hear
Title: Re: SMF Likes Plus
Post by: BGH on April 01, 2013, 08:16:20 PM
Time to keep-bothering-asking-questions LOL. (Just a wee bit of humor in this 'special day' :P)

How can I edit the DIV popup? I mean, one of the things I want is to point the like.png image to the default theme's images url. Maybe is kind of a silly edition, but I want to redesign the popup look a bit if possible (mind you, I'm not talking about modifying the table with the likes, I want to edit the div element in its structure, not only the CSS).

Thanks in advance!

Regards.
Title: Re: SMF Likes Plus
Post by: Illori on April 02, 2013, 05:48:57 AM
the like.png is pulled from the default themes images folder... i dont know what you mean there.

if you want to edit the popup look in script.js and the index.css file.

what exactly do you want to change in the popup?
Title: Re: SMF Likes Plus
Post by: Illori on April 03, 2013, 07:31:05 AM
ah i see the issue, try this fix

in script.js find
Code: [Select]
var sIcon = smf_images_url + '/' + typeof(sIcon) == 'string' ? sIcon : smf_images_url + '/' +  'likes/like.png';
and replace it with

Code: [Select]
var sIcon = smf_default_theme_url + '/' + typeof(sIcon) == 'string' ? sIcon : smf_default_theme_url + '/' +  'images/likes/like.png';
Title: Re: SMF Likes Plus
Post by: BGH on April 04, 2013, 05:46:00 AM
Thanks, that did the trick, Illori! ;D

Regards.
Title: Re: SMF Likes Plus
Post by: Illori on April 04, 2013, 05:48:30 AM
first post updated with the change.
Title: Re: SMF Likes Plus
Post by: BGH on April 05, 2013, 10:15:30 AM
Finally, I managed to come up with something nifty for those who don't want to allow guests to see people's likes. As it isn't something included by default, I'll share it here.

Here we go:

On Modifications.english.php:

Add before ?>:

Code: [Select]
$txt['likes_more2'] = '<a href="%1$s" onclick="return reqOverlayDivLike(this.href, \'An Error Has Occurred!\')">more people</a> like this.';


On Display.template.php:

Find:

Code: [Select]
echo implode(', ', $names), ' ', $txt['likes_and'], ' ', comma_format($array_length - 5), ' ', sprintf($txt['likes_more'], $scripturl . '?action=like;display;topic=' . $context['current_topic'] . ';msg=' . $message['id'], sprintf($txt[$array_length == 1 ? 'likes_popup_1' : 'likes_popup_n'], $array_length));
Replace with:

Code: [Select]
echo implode(', ', $names), ' ', $txt['likes_and'], ' ', comma_format($array_length - 5), ' ', $context['user']['is_guest'] ? $txt['likes_more2'] : sprintf($txt['likes_more'], $scripturl . '?action=like;display;topic=' . $context['current_topic'] . ';msg=' . $message['id'], sprintf($txt[$array_length == 1 ? 'likes_popup_1' : 'likes_popup_n'], $array_length));


On index.css:

Add at the end:

Code: [Select]
.popup_content_guests{text-align:center;margin:4em 2em;padding:0.5em;border:4px dotted #666;font:normal 16px/2em verdana,sans-serif;border-radius:16px}


On script.js:

Find:

Code: [Select]
error: function (xhr, textStatus, errorThrown) {
oPopup_body.html(textStatus);

Replace with:

Code: [Select]
error: function (xhr, textStatus, errorThrown) {
var like_content_guests = '<div class="popup_content_guests"><a href="index.php?action=login"><strong>Login</strong></a> or <a href="index.php?action=register"><strong>register</strong></a><br />to see people\'s likes</div>';
oPopup_body.html(like_content_guests);


So, when guests click the 'more people' link in the post, they'll see this:

(http://i.imgur.com/ninZ8aj.png)

I think that the bits of code added to script.js, can be worked out to fit your needs, so that's a very basic statement, but you can edit it to whatever you want (keep in mind if you need to use an ' add an \ before, so it should be = \', otherwise it'll return an error ).

That's it!  ;D
Title: Re: SMF Likes Plus
Post by: Johann on April 06, 2013, 07:10:36 AM
Dear SMF - Unofficial Help Forum Team,

coming into know your work here, some kind of desire in regard of your great work here came up and so I finally registered here.

Please allow me some (maybe silly seeming) question:

* Do you like to share this modification so that I can offer it further, on a place I am looking for at this time?
* would it be possible to use an alternative text for "Like", for example "esteem"
* is it possible to show different texts for different languages?
* and to change the picture (thumb)? cleared

and a little different question

* why you do not use this mod here on in your forum?

for a person who is not very familiar with all programming and website stuff.

Thanks for your time!

(http://sangham.net/Smileys/sadhu_sangham.gif)
Title: Re: SMF Likes Plus
Post by: Illori on April 07, 2013, 08:04:48 AM
read the license http://creativecommons.org/licenses/by-nc-nd/3.0/ that should answer your first question

it is possible to edit the like string to whatever you want.

you can translate this mod just like any other

i dont see a use for this mod on this forum.
Title: Re: SMF Likes Plus
Post by: BGH on April 07, 2013, 10:35:17 PM
Some things you may want to be aware of. Not trying to bother you, but I think it will help you to be aware of this. Mostly, they have to do with the popup.

Height & Width of popup

Right now you've set a class named popup_content which has a min-height set to 20em. It'd be good to also add a max-height with, for example, 35em. This would be right, because if a lot of people likes a post, like saying, 10 people, for example, the popup will enlarge a lot and sink to the bottom of the page, because it will indefinetely increase its height. If you set a certain max-height unit, then you have to set an overflow: auto;, so if the max height limit is surpassed it will add a scrollbar.

Summarizing, the changes needed should be:

Find:

Code: [Select]
.popup_content
{
min-height: 20em;
}

Replace with:

Code: [Select]
.popup_content
{
min-height: 20em;
max-height: 35em;
overflow: auto;
}

Avatar images present in popup

Well you might be aware of this, and kept in mind while you were making this mod. The default config of having set avatars to a width and height of 65px, is OK and it wouldn't be an issue for those who have set this. Problem comes when the images are set to a higher value, like for example, 150px x 150px. This size will mantain when the popup opens, and the result isn't lovely at all. One solution I came across with was to modify this (on Likes.php):

Code: [Select]
' . $memberContext[$liker]['avatar']['image'] . '
... to this:

Code: [Select]
<img src="' . $memberContext[$liker]['avatar']['href'] . '" height="65" width="65" alt="*" class="popup_avatar" />
Which now respects the height/width of 65px, which is OK, IMO (don't mind the popup_avatar class, is just there to give the image some styling).

This solution works pretty well for those who, actually, have an avatar. But for those who doesn't it will load an non-existent image, and it will look like a broken image link.

I was thinking on adding something like this (I grabbed this code from my theme's index.template.php)

Code: [Select]
if (!empty($context['user']['avatar']))  {
echo '
<img height="50" width="50" class="avatar" alt="" src="', $context['user']['avatar']['href'], '" />';
}
else {
echo '
<img height="50" width="50" class="avatar" alt="" src="', $settings['images_url'], '/no_avatar.png" />';
}

... and adding an no_avatar.png image, to my theme images folder, which would be OK, but I'm not able find a proper way to do this.

Hoping this is useful for you, and remember that I'm just only posting this to let you know about this stuff.

Best regards.
Title: Re: SMF Likes Plus
Post by: Johann on April 08, 2013, 10:38:03 AM
read the license http://creativecommons.org/licenses/by-nc-nd/3.0/ that should answer your first question

it is possible to edit the like string to whatever you want.
you can translate this mod just like any other
i dont see a use for this mod on this forum.

Thanks for your time and effort.

_()_
Title: Re: SMF Likes Plus
Post by: Illori on April 09, 2013, 12:14:19 PM
new version of the mod released in the op, allows you to style the popup using css instead of the tables it had before. added the max height to the popup and allows overflow[scrollbar].
Title: Re: SMF Likes Plus
Post by: BGH on April 10, 2013, 02:48:03 PM
Thank you Illori, great work!  :D

Great stuff!

Regards.
Title: Re: SMF Likes Plus
Post by: frostybore on April 10, 2013, 07:06:17 PM
Sometimes a Like isn't shown correctly, causing an eval error to show up.

e.g.

Sometimes it will show

[LIKE IMG] (no name displayed), User 1, User 2 Likes this

or

[LIKE IMG] (no name displayed) and User 1 Likes this

Whereas it should say

[LIKE IMG] User 1, User 2, User 3 Likes this

Is there a particular reason for this? It's not causing any issues performance wise, but it causes a ton of errors to appear in the log if it happens on an active thread. The issue seems to be that it tries to count the array, but since there's no "0" it can't start there?

Code: [Select]
8: Undefined index: 0

File: /var/www/vhosts/WEBSITE/httpdocs/forum/Themes/default/Display.template.php (main sub template - eval?)
Line: 657

Code: [Select]
// First, names
$names = array();
foreach ($context['post_likes'][$message['id']] as $liker)
{
$names[] = '<a href="' . $scripturl . '?action=profile;u=' . $liker . '">' . $user_profile[$liker]['real_name'] . '</a>';
if (count($names) >= 5)
break;
}

tl;dr - sometimes names don't show up as a Like, and it causes errors in the log


edit:

A look in my database shows that these broken likes have a member_id of 0 -- clearly that's incorrect. Why does it show up 0?

I've fixed the issue by changing this value to a correct one.
Title: Re: SMF Likes Plus
Post by: Illori on April 11, 2013, 05:43:28 AM
under server settings in admin disable evaluation of templates and post the actual error message without eval in it.
Title: Re: SMF Likes Plus
Post by: frostybore on April 11, 2013, 10:03:38 AM
Ok, next time it happens I'll post it here. I cleaned my log after I manually solved the issue so I don't have it available.
Title: Re: SMF Likes Plus
Post by: Illori on April 11, 2013, 10:27:37 AM
also for some reason have you somehow given guests the ability to like posts [should not be able to do this by default]?
Title: Re: SMF Likes Plus
Post by: frostybore on April 11, 2013, 06:30:48 PM
I thought that too, but no it does not show up as a guest.
Title: Re: SMF Likes Plus
Post by: Illori on April 12, 2013, 05:44:16 AM
it would not show up as a guest as the name, check your permissions to see if guest some how got the permission to like posts.

also do you know if the user may have deleted their account by chance?
Title: Re: SMF Likes Plus
Post by: frostybore on April 12, 2013, 01:42:42 PM
I'm checking under "Permissions" for Guest but I do not even see the option to enable/disable liking posts, whereas it shows up for Regular Members (under "Moderate the Board"). Am I looking in the right spot?

I don't believe any members have been deleted, either (deleting accounts is only an admin priviledge).
Title: Re: SMF Likes Plus
Post by: Illori on April 12, 2013, 02:29:50 PM
ok that is all good. then it sounds like what happened should not be able to happen.
Title: Re: SMF Likes Plus
Post by: frostybore on April 15, 2013, 04:34:19 PM
It happened again, this is what it says in error log:

Code: [Select]

8: Undefined index: 0

File: /var/www/vhosts/WEBSITE/httpdocs/forum/Themes/default/Display.template.php
 Line: 657


Which is the same code as the one posted earlier. I think it has to do with when the Like is posted - maybe some sort of timeout occurs and it can't capture the member ID, defaulting to the 0 hard-coded instead?

Here's a photo of what it looks like

(http://i.imgur.com/t3Vqj9F.png)
Title: Re: SMF Likes Plus
Post by: Illori on April 16, 2013, 05:42:12 AM
since you have modified your display.template.php for the area to show this mod that may be related can you attach your display.template.php to your next post?
Title: Re: SMF Likes Plus
Post by: frostybore on April 16, 2013, 07:18:03 AM
Ok, attached
Title: Re: SMF Likes Plus
Post by: Illori on April 17, 2013, 05:49:22 AM
do you know which user on your forum is triggering this to happen? since no one else is reporting this issue i think it is an issue with your forum only.
Title: Re: SMF Likes Plus
Post by: frostybore on April 17, 2013, 02:03:46 PM
I have no idea how to pinpoint if a specific person is doing it. Can I just change the "default" that the post does to my own user ID, so if it does error, it just puts in my ID as a default and everyone is none the wiser?
Title: Re: SMF Likes Plus
Post by: Illori on April 17, 2013, 05:31:30 PM
i dont think that would be smart and i think over time people may pick up on it.

why not ask your users if they notice the issue after they have liked a post?
Title: Re: SMF Likes Plus
Post by: Illori on April 18, 2013, 09:26:01 AM
problem fixed in new package in first post. only real change is in the likes.php file so you can just extract that file and override the existing file.

there is a query if you install the whole package to remove the 0 user id likes.
Title: Re: SMF Likes Plus
Post by: BGH on April 18, 2013, 04:10:12 PM
Thanks, I didn't have the problem that frostybore has mentioned, but I'll replace the file just in case that this will happen to me.

Regards.
Title: Re: SMF Likes Plus
Post by: almaxido on April 21, 2013, 10:04:15 PM
Thanks, works fine on 2.0.4 , simple and fantastic, please update when need it.

Thanks  :)

Title: Re: SMF Likes Plus
Post by: Illori on April 22, 2013, 05:49:19 AM
there is no need to update it until a new major version of smf is released due to the way the mod works.
Title: Re: SMF Likes Plus
Post by: oxy on May 03, 2013, 04:13:28 AM
excellent! now, i don't need to pay for the other smf*** like pro ...

Thumb up. will always support you!
Title: Re: SMF Likes Plus
Post by: westwegoman on May 17, 2013, 11:13:36 PM
Just curious.

Would it be hard to make the number of likes show on the message index?

Nice mod :)
Title: Re: SMF Likes Plus
Post by: Illori on May 18, 2013, 06:38:33 AM
you mean the listing of threads? considering that this mod has likes per message not per thread, i dont think that would be possible due to the fact that a message is not the same as a thread.
Title: Re: SMF Likes Plus
Post by: westwegoman on May 18, 2013, 02:52:58 PM
Ahh. Makes more sense now.

I don't know what I was thinking  ::)
Title: Re: SMF Likes Plus
Post by: westwegoman on May 21, 2013, 10:49:56 AM
One more question. Would it be hard to make the like section appear within the actual post that is being liked instead of below it?

Hope that made sense ;)
Title: Re: SMF Likes Plus
Post by: Illori on May 21, 2013, 03:41:40 PM
it can be done sure, but i am not the best at templates/css so i can not tell you for sure what has to be changed.
Title: Re: SMF Likes Plus
Post by: westwegoman on May 22, 2013, 01:52:10 AM
Yea, that's my problem also. I'll play around on one of my test boards. Thanks, it's a cool mod.
Title: Re: SMF Likes Plus
Post by: yigitq on June 08, 2013, 07:19:30 AM
get received like in profile
Title: Re: SMF Likes Plus
Post by: Illori on June 09, 2013, 06:33:59 AM
can you use a full sentence to explain what you want?

if you want a count of likes given/received i am not adding that feature.
Title: Re: SMF Likes Plus
Post by: MechSpecs on June 17, 2013, 01:51:59 PM
Looks like I am too noob for installing this one LOL

I got...

Execute Modification    ./Themes/core/Display.template.php    Test failed
      1.    Replace    ./Themes/core/Display.template.php    Test successful
      2.    Replace    ./Themes/core/Display.template.php    Test failed
      3.    Replace    ./Themes/core/Display.template.php    Test failed
      4.    Replace    ./Themes/core/Display.template.php    Test failed

Probably another mod has altered Display.template.php in 2.0.4 and Likes Plus no longer recognizes what it is supposed to change?
Title: Re: SMF Likes Plus
Post by: Illori on June 18, 2013, 05:48:12 AM
this mod does not support the core theme, if you are not using then ignore those messages
Title: Re: SMF Likes Plus
Post by: Antros22 on June 19, 2013, 08:08:04 AM
  ;D ;D it works likes a charm  like  :D
Title: Re: SMF Likes Plus
Post by: littlenicki on June 28, 2013, 11:13:37 AM
Hello, this looks like an excellent mod! Could a SMF 1.1.18 compatible version of it be done please? I could offer USD 40.00 to make it possible. Thank you, Nicole
Title: Re: SMF Likes Plus
Post by: P on June 28, 2013, 11:42:03 PM
Hi. I keep getting this error and unfortunately I don't know enough about php to fix it. Hope you can help me out.

Unknown column 'id_message' in 'field list'
File: /forum/Sources/Display.php
Line: 983


The line seems to be

Code: [Select]
);

$context['post_likes'] = array();
while ($row = $smcFunc['db_fetch_assoc']($likes))
$context['post_likes'][$row['id_message']][] = $row['id_member'];

$smcFunc['db_free_result']($likes);

$context['html_headers'] .= '
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>';


That's 983-992. It's happening no matter which theme I use. Any ideas? Any help will be much appreciated.  :)

Title: Re: SMF Likes Plus
Post by: Illori on June 29, 2013, 06:43:51 AM
what modification do you have installed? smf should fail to work if you do not have the id_message column in the database.

i can look into a 1.1.* version but i really doubt a version will be made due to the changes between the 2 versions of smf.
Title: Re: SMF Likes Plus
Post by: littlenicki on June 29, 2013, 09:30:39 AM
Hello Illori,

thank you for your reply. Well, I have about 300 Mods installed on my SMF 1.1.18, many of the custom made ones, which is also the reason why I do not wish to upgrade to SMF 2.0 or 2.1 ... doing so would mean too much work. Quite a few SMF 1.1.X owners feel the same.

Hence I would be most happy if there was a SMF 1.1.X version of your fine mod.

I really hope that you can make it possible please.

Regards,

Nicole
Title: Re: SMF Likes Plus
Post by: P on June 29, 2013, 04:07:40 PM
what modification do you have installed? smf should fail to work if you do not have the id_message column in the database.


Hi Illori,

Thank you for the quick reply.

I don't have any modifications installed at the  moment other than SMF Likes Plus. Once I take that out, everything works fine but if I install SMF Likes Plus, I get the same error on every thread in every theme.

Title: Re: SMF Likes Plus
Post by: Illori on June 30, 2013, 06:45:01 AM
well since no else has the issue and many have installed the mod i have to think it is an issue with your install and not the mod itself.
Title: Re: SMF Likes Plus
Post by: P on June 30, 2013, 04:32:45 PM
Alright. Well thank you anyways.
Title: Re: SMF Likes Plus
Post by: ZakNik on July 09, 2013, 06:10:16 PM
thank you man i have thamk you and i was dying for like button...can we put it under post? because in top is weird i read post then i must go back to top to give like...sorry for my bad english :)
Title: Re: SMF Likes Plus
Post by: Illori on July 10, 2013, 05:49:31 AM
you can move it where ever you want but i am not providing the code to move it.

also i am not a man.
Title: Re: SMF Likes Plus
Post by: inter on July 10, 2013, 03:07:02 PM
why settings of the module is in the moderation section?
Title: Re: SMF Likes Plus
Post by: Illori on July 11, 2013, 05:39:12 AM
what moderation section? there is nothing in smf called a moderation section.
Title: Re: SMF Likes Plus
Post by: inter on July 11, 2013, 04:14:40 PM
Code: [Select]
<file name="$sourcedir/ManagePermissions.php">
<operation>
<search position="before"><![CDATA['send_topic' => array(false, 'topic', 'moderate'),]]></search>
<add><![CDATA[
'can_like' => array(false, 'topic', 'moderate'),]]></add>
</operation>

moderate



sorry my english
Title: Re: SMF Likes Plus
Post by: Illori on July 11, 2013, 05:36:52 PM
because the other options near it in the code are also in that section, it does not really matter that much overall where the option is.
Title: Re: SMF Likes Plus
Post by: MechSpecs on July 12, 2013, 12:28:38 AM
Really enjoy this mod and the fact that it is free is even better. Some of those mods are very bloated and quite expensive.

I've even managed to figure out how to move it around to where I want it.

Any thoughts as to whether you will expand upon this so that likes can be tracked via Profile (Likes Given, Likes Received)?

Also, if one uninstalls this mod in the future how do they get rid of all the likes that have already been attached to messages?
Title: Re: SMF Likes Plus
Post by: Illori on July 12, 2013, 05:30:21 AM
there is option upon uninstall to delete all data in the database related to the mod.

i will not be tracking how many likes given or received that has been asked before and it will not be added.
Title: Re: SMF Likes Plus
Post by: MechSpecs on July 12, 2013, 01:48:12 PM
Thats too bad but good to know, thanks.
Title: Re: SMF Likes Plus
Post by: mosravo on August 01, 2013, 08:52:16 AM
WHERE TO GET SMF LIKE PLUS
Please Pals, where can i download the smf like Plus or the link to it?
Title: Re: SMF Likes Plus
Post by: Illori on August 02, 2013, 05:52:07 AM
it is attached in the first post. and you dont need to use large font and color to get our attention.
Title: Re: SMF Likes Plus
Post by: eric1234 on September 07, 2013, 12:21:52 PM
erm.. after i installed this mods, i didn't saw any like button in the topics or posts. Not sure where goes wrong .
Title: Re: SMF Likes Plus
Post by: Illori on September 08, 2013, 05:39:59 AM
do you use the core theme or a custom theme with its own display.template.php?

if so then you need to do manual edits to make the mod show up.
Title: Re: SMF Likes Plus
Post by: eric1234 on September 09, 2013, 04:38:13 AM
do you use the core theme or a custom theme with its own display.template.php?

if so then you need to do manual edits to make the mod show up.
Weird why my members cant see the like button but only me can see?

I set member permissions already
Title: Re: SMF Likes Plus
Post by: Illori on September 09, 2013, 05:42:12 AM
do you use a permission profile on those board(s)?
Title: Re: SMF Likes Plus
Post by: eric1234 on September 09, 2013, 11:16:51 AM
do you use a permission profile on those board(s)?
By default, suppose to be yes right?

Now my admin acc also cant see the 'like' button. Got no idea which part goes wrong

lol, now my normal member account got like, my admin account don't have. The button is like playing magic, sometimes got, sometime dont have
Title: Re: SMF Likes Plus
Post by: Illori on September 10, 2013, 05:56:37 AM
are all your users using the exact same theme?

by default all boards use the same set of permissions, a permissions profile is not exactly the same.
Title: Re: SMF Likes Plus
Post by: haroldgtv on September 17, 2013, 04:55:36 PM
Great mod !!  thank you very much.

ive got only 1 problem.  It gave an error on installation.   But it seems to work ok !  but left of the like button.. i dont see the thumb icon?


Ive checked.. the like folder is there in the image folder. 

Can you help me ?

I use 2.0.5  and the CarbonRed theme..

Ive included a attachement.

www.clubalfaromeo.nl
Title: Re: SMF Likes Plus
Post by: Illori on September 18, 2013, 05:39:31 AM
did you install the css to that theme? if not then the image will never appear. uninstall the mod and reinstall being sure to check to install on that theme.
Title: Re: SMF Likes Plus
Post by: haroldgtv on September 18, 2013, 10:48:45 AM
Your right.. i forget to install it specific for my theme.  So thank you !

Execpt the unistall didnt go well i suspect...  because now i have 2 like buttens..  ;D

And 2 notifications below a post..   so i guess the code is double somewere...

Can you tell me witch file i have to edit.. to delete the double code ?

See the attachement.
Title: Re: SMF Likes Plus
Post by: Illori on September 18, 2013, 01:57:51 PM
display.template.php
Title: Re: SMF Likes Plus
Post by: haroldgtv on September 18, 2013, 02:16:39 PM
Found it... thank you....  Now i have 1 button.. !   :)

Great addon !!   Good job..


www.clubalfaromeo.nl
Title: Re: SMF Likes Plus
Post by: Mandrake on October 16, 2013, 07:25:35 AM
Thank you for an awesome mod, Illori.

I had to install manually some of the modifications, particularly for the theme I'm using (Bright Forest, under SMF 2.0.5) but managed to get it running just fine, with one exception - The Like/Unlike icons do not show in the post header. I don't think it has anything to do with paths or permissions, it's surely a syntax issue, and I would really appreciate any help... the syntax of the manual edits doesn't really match with the syntax in my theme's Display.template.php, and although I'm learning slowly, I cannot figure it out by myself now. Lines 399 and ahead:

Code: [Select]
// Maybe we can approve it, maybe we should?
if ($message['can_approve'])
echo '
<li><a href="', $scripturl, '?action=moderate;area=postmod;sa=approve;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $approve_button, '</a></li>';

if ($message['can_like'])
echo '
<li class="like_button" id="like_button_', $message['id'], '"><a href="', $scripturl, '?action=like;topic=', $context['current_topic'], ';msg=', $message['id'], '">', '<strong>', $txt['likes_like'], '</strong>', '</a></li>';

if ($message['can_unlike'])
echo '
<li class="unlike_button" id="unlike_button_', $message['id'], '"><a href="', $scripturl, '?action=like;topic=', $context['current_topic'], ';msg=', $message['id'], '">', '<strong>', $txt['likes_unlike'], '</strong> ', '</a></li>';

Thanks in advance for pointing any problems!
Title: Re: SMF Likes Plus
Post by: Illori on October 17, 2013, 05:42:58 AM
did you add the css to your themes index.css?
Title: Re: SMF Likes Plus
Post by: Mandrake on October 17, 2013, 01:06:01 PM
I did. Quoting as example /forum/Themes/brightforest_23/css/index.css :

Code: [Select]
}ul.quickbuttons li.like_button
{
background: url(../../default/images/likes/like.png) no-repeat;
}

And the .pngs are in /forum/Themes/default/images/likes when browsing the joomla site.

Any suggestions? Thank you.
Title: Re: SMF Likes Plus
Post by: Illori on October 17, 2013, 02:47:12 PM
that is not the only css to add

Code: [Select]
ul.quickbuttons li.like_button
{
background: url(../../default/images/likes/like.png) no-repeat;
}

ul.quickbuttons li.unlike_button
{
background: url(../../default/images/likes/unlike.png) no-repeat;
}

.like
{
margin: 0.2em 0.2em 0.2em 0.2em;
padding: 0.2em 0.2em 0.2em 1em;
}
/* Some of the following css is BSD licensed from smf 2.1 */
/* Styles for popup windows
------------------------------------------------------- */
.popup_container
{
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
}

.popup_window
{
position: fixed;
width: 480px;
z-index: 99;
padding: 0;
box-shadow: 0 0 8px rgba(0,0,0,0.2);
border-radius: 10px;
max-height: none!important;
overflow: visible!important;
}

.popup_heading
{
height: 15px;
padding: 10px;
border-top-right-radius: 8px;
border-top-left-radius: 8px;
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
}

.popup_content
{
padding: 5px;
margin: 0;
min-height: 20em;
max-height: 35em;
overflow: auto;
}

.popup_heading .hide_popup
{
display: inline-block;
width: 16px;
height: 16px;
background: url(../../default/images/likes/delete.png) center center no-repeat;
float: right;
}

.popup_heading .icon
{
vertical-align: middle;
margin: -4px 4px 0 0;
}
// End of BSD css

.likes{
 display:table;
}

.trlikes {
    display:table-row;
}
.tdlikes {
    display:table-cell;
height: 32.5px;
line-height:64px
}
.tdlikes .avatar{
padding-top:10px;
max-height: 65px;
max-width:  65px;
vertical-align: middle;
}

.nameslikes{
line-height: 65px;
padding-left:50px;
}

does it work on the default theme?
Title: Re: SMF Likes Plus
Post by: Mandrake on October 18, 2013, 09:54:48 AM
The whole css edit you quoted is included in the index.css of my theme. I only quoted the first lines to acknowledge your suggestion, sorry about that.

And the Like/Unlike icons do appear in the SMF Default Curve Theme, that's why I assumed it would have to do with some syntax problem in the specific Display.template.php of my forum theme I copied before.
Title: Re: SMF Likes Plus
Post by: Illori on October 19, 2013, 07:35:56 AM
move the like/unlike.png images to your themes images/likes folder change
background: url(../images/likes/like.png)

and

background: url(../images/likes/unlike.png)

of course this will only work if your themes css is in a css folder and the css folder in the main folder of your theme if it is elsewhere that is why it is breaking.
Title: Re: SMF Likes Plus
Post by: Mandrake on October 20, 2013, 07:57:03 PM
Done, and the paths do agree with what you suggested, but the icons still do not appear using the theme. Are you sure the Display.template.php I posted is okay? I included the syntax for the "can_approve" button commands since every other line for post icons in the php file follows the same syntax, and the modifications for your mod have a different syntax. I'm sorry for my php deficiencies, but couldn't the problem be in how the arguments for the echo commands are expressed?
Title: Re: SMF Likes Plus
Post by: Illori on October 21, 2013, 05:46:50 AM
if the text shows up the issue is where the images are which is defined in the css. you could use your browser tools and examine the page and see where it is calling the images from and make sure they exist there.
Title: Re: SMF Likes Plus
Post by: Mandrake on October 21, 2013, 11:16:44 AM
I managed to fix it, but the problem is not in the css 'background' image path. Or if it is, there's something to do with the default_images_url variable.

1) The images are both in the default/images/likes, and in the brightforest_23/images/likes folders. Both default and brightforest_23 are under the Themes folder. I've double checked this, there's no error in the paths, or in the file names.
2) The css for default points to ../../default/images/likes and the icons appear fine under the default forum theme view.
3) In the css for brightforest_23, I've tried both ../../default/images/likes and ../images/likes. In neither case I can see the icons under the bright forest forum theme view.

and I even tried to place the PNGs in another folder and to change the path accordingly. Same result: they show in default theme, they don't in bright forest theme.

However, I found a workaround although the result layout is not properly aligned with the rest of the modify/quote/etc. post buttons. I included the image code from the like icon that did show up - the one in the message bottom with the received likes list. Result:

Code: [Select]
if ($message['can_like'])
echo '
<li><img src="' . $settings['default_images_url'] . '/likes/like.png" alt="', $txt['likes'], '" /><a href="', $scripturl, '?action=like;topic=', $context['current_topic'], ';msg=', $message['id'], '">', '<strong>', $txt['likes_like'], '</strong>', '</a></li>';

if ($message['can_unlike'])
echo '
<li><img src="' . $settings['default_images_url'] . '/likes/unlike.png" alt="', $txt['unlike'], '" /><a href="', $scripturl, '?action=like;topic=', $context['current_topic'], ';msg=', $message['id'], '">', '<strong>', $txt['likes_unlike'], '</strong> ', '</a></li>';

Regardless of that, the php for the post header icons does not seem to work as is for Bright Forest Display.template.php.
Title: Re: SMF Likes Plus
Post by: Draffi on November 27, 2013, 09:19:24 AM
I have the Thankyou-Mod installed (for SMF 2).

Exist a converter from "Thankyou" to "Likes" ?
Title: Re: SMF Likes Plus
Post by: Illori on November 28, 2013, 06:23:03 AM
no and there will not be.
Title: Re: SMF Likes Plus
Post by: radu81 on November 30, 2013, 06:04:09 AM
Thanks for this mod!

What I miss is a counter of total likes under profile, I saw it won't be made :( Well even without is still a great mod! Thanks again
Title: Re: SMF Likes Plus
Post by: BurkeKnight on December 08, 2013, 08:56:36 AM
1. A link to the site would be useful.
2. The icons do not show, but what about the text?
Title: Re: SMF Likes Plus
Post by: Illori on December 09, 2013, 05:45:33 AM
1. A link to the site would be useful.
2. The icons do not show, but what about the text?

what are you replying to?
Title: Re: SMF Likes Plus
Post by: BurkeKnight on December 09, 2013, 09:26:17 AM
Was asking Mandrake.
Strange that I did not get this page until now. Even when I viewed my post after posting, it showed right after Mandrake's original post.

Today, I see the rest of the posts in between.
Title: Re: SMF Likes Plus
Post by: coolrunner on December 12, 2013, 01:40:14 PM
Hi, I am knew to SMF and all things regarding it so I need little help.

For the start, let me say that I am not the one searching for easy solutions. I always first try to read available tutorials and ask only if I am stuck.

I downloaded this mod, uploaded it through Package Manager, start with instalation process and stuck here:

(http://www.dodaj.rs/f/1p/2Y/1T52qnkX/smf-like.png)

Any idea what am I doing wrong to get those failed tests?


Thanks.
Title: Re: SMF Likes Plus
Post by: Illori on December 13, 2013, 05:50:26 AM
do you use the core theme? if not ignore them.
Title: Re: SMF Likes Plus
Post by: coolrunner on December 14, 2013, 04:36:26 PM
I think that I am not using Core there.

Under Themes and Layout Settings > Overall forum default it is set to SMF Default Theme - Curve. I have in drop down menu also option for Core theme, but Default/Curve is the one I got while installing SMF and I didn't change anything.

So I should just ignore red things and continue with installation?

Edit: I have installed it and it seemed to work. I see Like button at every members post and when I press it it shows in the bottom of liked message.

The problem is that I am the only one who can see Like button, other members don't see it.
Title: Re: SMF Likes Plus
Post by: Illori on December 15, 2013, 07:04:51 AM
then you have not set your permissions correctly.
Title: Re: SMF Likes Plus
Post by: irena on December 23, 2013, 06:24:39 PM
I love it! Thank you, thank you, thank you!
Title: Re: SMF Likes Plus
Post by: Maik on January 16, 2014, 03:50:31 PM
Being new to SMF boards it took me a little while to find the permission but is working fine, members like it. Thanks, Illori.
Title: Re: SMF Likes Plus
Post by: OldFossil on January 17, 2014, 07:04:18 PM
Any reason as to why th likes image would show in one place and not the other?

All images are in their respective folders and paths are correct.

The image  aligned with modify etc does not show.
Title: Re: SMF Likes Plus
Post by: Illori on January 18, 2014, 07:10:20 AM
what is one place and what is another? some details or you will get no help.

sounds like you did not install the mod on a custom theme.
Title: Re: SMF Likes Plus
Post by: OldFossil on January 18, 2014, 02:07:04 PM
some details or you will get no help.


Oh how usually pleasant of you illori.

What a surprise.

There are two places the mod shows.

These are the places I am referring too.

The mod doesn't even show on the default theme properly either.
Title: Re: SMF Likes Plus
Post by: Illori on January 18, 2014, 08:35:08 PM
well since the mod works fine for lots of other people i cant really tell what you may have done wrong.

also if you can not be nice here you can go elsewhere and use another likes mod.
Title: Re: SMF Likes Plus
Post by: OldFossil on January 18, 2014, 08:37:18 PM
You're not exactly nice to people either.

Would be easier to fathom out if there was a package parser on the forum.
Title: Re: SMF Likes Plus
Post by: Illori on January 19, 2014, 06:45:31 AM
there are package parsers out on the web if you really want one... and no i am not going to find or create one. most i have found on the web dont work anyway.
Title: Re: SMF Likes Plus
Post by: Arantor on January 19, 2014, 01:03:38 PM
And you're a paragon of nicety yourself, Old Fossil. Not.

There are several package parsers out there. Or you could learn to read the package file yourself, because it's not that hard to do.

The fact is, you're one of the greatest hypocrites I've had the misfortune to deal with in the SMF ecosystem. You tell people off when they don't provide enough information but you're terrible for not providing enough information yourself.

For example, 'the mod shows in one place and not the other'. That isn't enough information. Where does it show? Where does it not show?
Title: Re: SMF Likes Plus
Post by: OldFossil on January 19, 2014, 01:07:38 PM
Was clear to me but then again I can see it.

 :-X

The moid shows when the topic is liked.

Ie bottom left (where the member name shows).

However the section above (next to modify etc) doesn't show the image nor the deloete image.

Same on default theme.

I have also tried other browsers too with the same result.
Title: Re: SMF Likes Plus
Post by: TJM on January 20, 2014, 12:14:58 AM
Fresh clean install of SMF 2.0.6.  No other mods installed.

Installation results in the following error message, removing the mod corrects the error.

Suggestions please

----------


Database Error
Unknown column 'id_message' in 'field list'
File: /home/mensroom/public_html/forums/Sources/Display.php
Line: 983
Title: Re: SMF Likes Plus
Post by: Illori on January 20, 2014, 06:02:01 AM
a few people have reported this error but i am not sure why it is being generated or how to fix it.
Title: Re: SMF Likes Plus
Post by: Illori on January 20, 2014, 12:22:46 PM
did you have another likes mod installed before? if so you need to remove the old likes table in the database and let this mod recreate it correctly.
Title: Re: SMF Likes Plus
Post by: TJM on January 20, 2014, 05:35:05 PM
Managed to get the mod working.  Looks pretty good. Only remaining issue is that the images don't display?  Just the words "like" and  "unlike."  Permissions?  Something else?  Thanks for the quick response so far.
Title: Re: SMF Likes Plus
Post by: TJM on January 20, 2014, 11:48:28 PM
And never mind. Solved.
Title: Re: SMF Likes Plus
Post by: mcpheex3 on January 31, 2014, 01:50:42 AM
TJM - can you share how you solved that? The images don't show up for me, either. Thanks!
Title: Re: SMF Likes Plus
Post by: salkdjfkasdjfalsdjfka on March 15, 2014, 04:32:44 AM
Just a quick FYI.

Some of us like to install our mods manually because for some reason we have problems having SMF automatically install mods.

Some of really have issues reading XML files or whatever.  I have tried to use the parse reader online but that does not work.

Is there a simple TXT file that shows, what to add, edit, copy for old timers?
Title: Re: SMF Likes Plus
Post by: Illori on March 15, 2014, 06:37:02 AM
nope
Title: Re: SMF Likes Plus
Post by: i_fiorentino on April 28, 2014, 09:25:39 AM
Hi,
this is my first post here  :)
I've just installed this great new feature but i'm asking....
Is it possible to move "Like" button in other position?
Because, on that position, users are get used to push "Quote" button  :(

Which file should i edit?
Thanks in advance.
Regards,


Alessandro
Title: Re: SMF Likes Plus
Post by: Illori on April 29, 2014, 05:47:36 AM
display.template.php
Title: Re: SMF Likes Plus
Post by: i_fiorentino on April 29, 2014, 03:48:23 PM
Fixed!

Thank you so much.
Regards,



Alessandro
Title: Re: SMF Likes Plus
Post by: Teme on April 30, 2014, 01:26:53 AM
I have installed this mod for SMF 2.0.7.and it seems to work fine with all other functions expect the popup when there are more than 5 likes. I have performed clean re-install and it didn't solve the issue. Link on "more" leads to 404 error page (it seems that link will be generated incorrectly). I have read instructions and discussion from your forum but didn't catch the point where the issue is?

Could you please help me?
Title: Re: SMF Likes Plus
Post by: -Volpe™. on May 14, 2014, 09:59:08 AM
Hi Illori, thanks for the great mod...

Only one question... Why users can't like a closed topic?

Thanks so much!
Title: Re: SMF Likes Plus
Post by: Illori on May 14, 2014, 11:25:26 AM
seems to work fine for me.
Title: Re: SMF Likes Plus
Post by: -Volpe™. on May 14, 2014, 11:43:57 AM
Here are my users permissions:

(http://i.imgur.com/VHlTnsY.png)

(http://i.imgur.com/1MH1Sia.png)

(http://i.imgur.com/uKCzuCG.png)

What can be the problem?  >:(

If you need i can upload you my php files..
Title: Re: SMF Likes Plus
Post by: Illori on May 14, 2014, 06:12:40 PM
no idea what the issue is as no one can reproduce it.
Title: Re: SMF Likes Plus
Post by: Harvester on May 18, 2014, 06:42:19 PM
Not sure what happened.. but I installed this.. I let smf 2.0.7 install it but then had to manually edit my display.template file which I did. But I see no sign at all of this mod on my site.. nothing in admin, nothing on any topic or post. Not sure whats happening. Please help?
Title: Re: SMF Likes Plus
Post by: Illori on May 19, 2014, 05:45:45 AM
the only thing you should see in admin is the permission to let people like posts. sounds like your edit was not correct or complete.
Title: Re: SMF Likes Plus
Post by: -Volpe™. on May 23, 2014, 08:14:28 AM
Hi Illori,

is there any options to display likes received in every profile?

P.S.: The problem of like button was because i haven't configured the section profile properly.

Thnx
Title: Re: SMF Likes Plus
Post by: Illori on May 24, 2014, 06:14:08 AM
nope there is not and will not.
Title: Re: SMF Likes Plus
Post by: benfin on June 14, 2014, 05:29:59 PM
A newbie question.

This seems to be very nice mod. Where can I download it?  :-[
Title: Re: SMF Likes Plus
Post by: Illori on June 15, 2014, 06:10:00 AM
attachment of the first post.
Title: Re: SMF Likes Plus
Post by: benfin on July 07, 2014, 07:02:29 AM
Thanks a lot for location of the file. I have installed it and it seems to be working however the likes images didn't show.

Am I doing something wrong?  :'(
Title: Re: SMF Likes Plus
Post by: Illori on July 08, 2014, 05:48:42 AM
check that they are in the correct location, use your browser tools to inspect the element to get the path.
Title: Re: SMF Likes Plus
Post by: juanpedro on September 22, 2014, 02:48:20 PM
Thanks for the mod, i have a question;
Can i enable likes just for the first comment? So users will like topic not posts.
Thanks again.
Title: Re: SMF Likes Plus
Post by: Illori on September 23, 2014, 05:38:49 AM
not with this mod.
Title: Re: SMF Likes Plus
Post by: psycorps on December 03, 2014, 10:55:41 AM
my users get an error as I can see in the log files:

8: Undefined index: saythanks_times

what's my problem? anyone got an idea?
Title: Re: SMF Likes Plus
Post by: Illori on December 04, 2014, 06:16:33 AM
that is not from this mod.
Title: Re: SMF Likes Plus
Post by: ffarmaa on January 01, 2015, 10:00:54 AM
Hi,, any have traduction for spanish_es please? :)
Title: Re: SMF Likes Plus
Post by: Illori on January 02, 2015, 05:37:23 AM
no translations have been provided.
Title: Re: SMF Likes Plus
Post by: Gringoboy on March 30, 2015, 05:00:55 PM
Just installed Likes Plus on version 2.09 and it's not showing up even in permissions.
Maybe I'm doing something wrong here???
Title: Re: SMF Likes Plus
Post by: Illori on March 31, 2015, 05:31:15 AM
are you sure it does not show up? if it is not present then the install must not have completed successfully.
Title: Re: SMF Likes Plus
Post by: Gringoboy on March 31, 2015, 08:44:12 AM
From what I understand, you only need to set the permissions to deny likes as it's default is on for everyone??
When I go to reinstall it says it's already installed.I previously uninstalled another like mod btw.
Show me where to look so that I can check please.
Thanks
Title: Re: SMF Likes Plus
Post by: Illori on April 01, 2015, 05:31:03 AM
you have to give each group the permission to like or they can not like at all.
the permission is a few permissions above the move topic permission.
Title: Re: SMF Likes Plus
Post by: Altair__ on June 16, 2015, 02:40:35 PM
I can't see the download link. Can you please send it to me?
Title: Re: SMF Likes Plus
Post by: Illori on June 17, 2015, 05:26:31 AM
there is no reason why you can not see the attachment on the first post.
Title: Re: SMF Likes Plus
Post by: lurkalot on June 23, 2015, 01:19:57 PM
Nice mod. Might give this a try. Thanks.

By the way, I can see the attachment at the bottom of the first post without problem.  ;)
Title: Re: SMF Likes Plus
Post by: Rancher on June 26, 2015, 12:46:00 PM
I am using this mod for two years now. It is absolutely great! I am frustrated about the lack of these options, though:

– How many likes has this user received? (Profile page)
– How many likes has this user given? (Profile page)

This would greatly improve your mod. I am starting to think if I should replace this mod with Like Posts just because of these features, but I guess I will lose all the likes on the forum.

Thank you in advance.
Title: Re: SMF Likes Plus
Post by: Illori on June 27, 2015, 06:11:27 AM
there are no plans to add that to the mod. from what i have seen of people using the other mod you mention they run into issues because the mod is heavier and has more features.
Title: Re: SMF Likes Plus
Post by: Harvester on July 12, 2015, 07:38:09 PM
I have this installed but I see nowhere in the admin panel that I can adjust any settings. Seems I have my permissions wrong as only I the admin can see the likes button to like the post. WHere do I set the permissions? I dont see it in the normal permissions area.
Title: Re: SMF Likes Plus
Post by: Illori on July 13, 2015, 05:27:10 AM
it should be in the permissions do a search on that page for Like and it should show up.
Title: Re: SMF Likes Plus
Post by: TomW on August 31, 2015, 02:20:18 PM
I have installed the mod and everything works perfectly !  One item though - the image files do not display.  Note that I am using SMF 2.0.10 and a custom theme, alba anaigh by Brian Deakin.
Title: Re: SMF Likes Plus
Post by: Illori on September 01, 2015, 05:16:36 AM
then you did not select to install the mod to your custom theme. you would need to manually copy the image to your theme.
Title: Re: SMF Likes Plus
Post by: Ken. on September 18, 2015, 06:57:21 AM
Great Mod.  8)

Installing to my xampp test forum works great and shows with no issues, but when I  try to install it to my live site (http://www.ourfamilyforum.org/FamilyForum/index.php?action=forum) it gives an error, " ./Themes/default/Display.template.php".

EDIT: After doing some research in this topic and elsewhere (http://wiki.simplemachines.org/smf/Error_in_mod_installation) it's looking as though I'll need to do a manual edit on the Display.template.php file.
Title: Re: SMF Likes Plus
Post by: Ken. on September 18, 2015, 04:27:26 PM
The install errors are being caused by the "Say Thanks 1.3.3" (http://custom.simplemachines.org/mods/index.php?mod=3898) Mod which has edits for the same locations in the Display.template.php file, so I went ahead and installed the Likes mod and it appears to work as expected until I try to manually do the edits to the Display.template.php file. After the edits are in place and the file is loaded to the server the forum returns a blank screen. 

Maybe I butchered the edits, so I'll give it another try later, but for now it seems to work OK without the edits.
Title: Re: SMF Likes Plus
Post by: Illori on September 19, 2015, 07:55:27 AM
which edits are failing? can you attach your display.template.php file to your next post?
Title: Re: SMF Likes Plus
Post by: Ken. on September 19, 2015, 03:03:17 PM
OK, will do.
As mentioned, I may have messed up the edits, haven't had the time to go through them again.

File 1 is currently on the server and seems to work OK
File 2 is the one with my edits.
Title: Re: SMF Likes Plus
Post by: Illori on September 19, 2015, 03:56:42 PM
here you go
Title: Re: SMF Likes Plus
Post by: Ken. on September 19, 2015, 04:48:02 PM
Thanks... That works.  8)

No errors in the logs either.
Title: Re: SMF Likes Plus
Post by: Jeroi on September 30, 2015, 08:35:28 AM
How can I tranalsate the plugin? I don't see any translation settings at admin area?
Title: Re: SMF Likes Plus
Post by: Illori on October 01, 2015, 07:37:31 AM
it is all in install.xml

Code: [Select]
<file name="$languagedir/Modifications.english.php">
<operation>
<search position="end" />
<add><![CDATA[
$txt['likes'] = 'Likes';
$txt['likes_1'] = '1 Like';
$txt['likes_n'] = '%1$s Likes';
$txt['likes_like'] = 'Like';
$txt['likes_error'] = 'Data wasn\'t enough to process the request';
$txt['likes_no_yourself'] = 'You can\'t like your own posts';
$txt['likes_unlike'] = 'Unlike';
$txt['likes_more'] = '<a href="%1$s"  onclick="return reqOverlayDivLike(this.href, \'%2$s\');">more people</a> like this.';
$txt['likes_and'] = 'and';
$txt['likes_one'] = 'likes this.';
$txt['likes_few'] = 'like this.';
$txt['likes_nobody'] = 'Nobody likes this post.';
$txt['likes_popup_1'] = 'The following 1 person likes this post';
$txt['likes_popup_n'] = 'The following %1$s people like this post';]]></add>
</operation>
</file>

<file name="$languagedir/ManagePermissions.english.php">
<operation>
<search position="end" />
<add><![CDATA[$txt['permissionname_can_like'] = 'Like Posts';
$txt['permissionhelp_can_like'] = 'This permission allows a user to like posts';]]></add>
</operation>
</file>
Title: Re: SMF Likes Plus
Post by: debiwebi on October 20, 2015, 06:15:47 PM
I downloaded this mod this afternoon. I like it better than a previous one I found because I can edit the language (want it to say "thanks" instead of "like") and it sounds like, from what I read above, I may be able to use it with my Sunset theme.

I tried to install and got the warnings shown in the screen capture below. I haven't read every post in this topic, but from what I've seen I may need to edit some files manually after install? I'm not very technical, but can follow instructions.

I'm just not sure how to proceed from this point with the install. Just check the boxes even though it says the tests failed?

I did see this above:
here you go

Also, should I make the language changes in install.xml or can that be done somewhere else after the install? Such as Modifications.english.php?

I'm currently running smf 2.0.10.

Thanks.
Title: Re: SMF Likes Plus
Post by: Illori on October 21, 2015, 05:45:00 AM
if you dont use the core them, then ignore those errors. otherwise you will need to manually install the mod on your theme. if you check the boxes, it will do nothing as the tests fail.

i am not going to do all the edits for you, you need to learn how to modify the files when a mod fails to install.
Title: Re: SMF Likes Plus
Post by: debiwebi on October 21, 2015, 12:55:03 PM
i am not going to do all the edits for you, you need to learn how to modify the files when a mod fails to install.

Well, okay, thanks. I don't know the first thing about code, but have in the past been able to fumble my way around without doing too much damage. I'll give it a shot. I've debated dropping my theme because a lot of mods don't work with it. BTW the one you're using here is very attractive and clean.
Title: Re: SMF Likes Plus
Post by: debiwebi on October 23, 2015, 11:59:25 AM
I did install Likes Plus and it appears just fine in Curve, but I noticed my SA Chat bar/window disappears on topic/post pages. It still shows on other miscellaneous pages, such ad in Admin windows, home page, stuff like that.

Too bad! I just need to find out which mod is more important to the members, Chat or Likes (or potentially "Thanks").

That's all, just wanted to get that written down for the record.
Title: Re: SMF Likes Plus
Post by: Garrett on October 28, 2015, 07:38:01 AM
Can somebody please forward me the like plus download link? I cannot find it, maybe it has been removed or is not visible for this membergroup. If no, then please provide me the download link.

Thanks.
Title: Re: SMF Likes Plus
Post by: Illori on October 28, 2015, 05:45:47 PM
the file is attached to the first post of this topic. there is nothing that stops a registered member from downloading it.
Title: Re: SMF Likes Plus
Post by: ibiobiz on February 07, 2016, 03:56:34 PM
Question, where can I rename the button to for example Swedish for like "Gilla" ;-)

Never mind, found the answer 4 inches above :-)
Title: Re: SMF Likes Plus
Post by: violoniste18 on February 28, 2016, 01:00:57 PM
hello,

I wake up this thread, I just install this mod, it works great but I don't see the picture "thumbup" ou "thumbdown"

So visibility of that button "like" is not very good ...

I don't find out the reason, I need helping

thanks in advance (i am french)
Title: Re: SMF Likes Plus
Post by: Illori on February 29, 2016, 05:43:28 AM
are you using a theme other then the default theme? if so then the image(s) did not get copied to your theme. you need to do so manually.
Title: Re: SMF Likes Plus
Post by: violoniste18 on February 29, 2016, 11:57:29 PM
I got the same mistake with standard theme, perhaps since I made a lot of changes.

I have to change hosting, then i Will rather do transfer + upgrade with "large upgrade" from smf

I just do it, it's possible I will come back for helping ...

thanks !
Title: Re: SMF Likes Plus
Post by: violoniste18 on March 05, 2016, 02:23:26 AM
I just install mod "SMF Likes Plus 1.5" with my smf version 2.0.11

It works great now but i would like to get a "total likes" at the profile, how to do that please ?

is that possible to have a total counter ?

It will be quite great to get it !
Title: Re: SMF Likes Plus
Post by: Illori on March 05, 2016, 06:45:32 AM
nope, if you want those features you can figure out how to add them yourself. i have no plans to add any features to this mod.
Title: Re: SMF Likes Plus
Post by: violoniste18 on March 05, 2016, 06:57:28 AM
hum ... i understand I have to learn php langage ... I am only a user, then it's impossible, that's a shame but i have therefore to leave this idea
Title: Re: SMF Likes Plus
Post by: Mayhem on November 13, 2016, 08:53:09 PM
Does anyone has a link so we can see the mod in action?
Title: Re: SMF Likes Plus
Post by: Illori on November 14, 2016, 05:36:56 AM
it works just like it shows in the first post. if you really want to see how it works before putting it on your forum, install a test forum and install it there.
Title: Re: SMF Likes Plus
Post by: Mayhem on November 14, 2016, 12:48:05 PM
Ok, no problem. How come you're not using your own mod on here?
Title: Re: SMF Likes Plus
Post by: Illori on November 15, 2016, 05:26:59 AM
i dont see a need to have it here. now if this forum was very busy that may be a different story.
Title: Re: SMF Likes Plus
Post by: Anonskii on January 13, 2017, 12:21:57 PM
Great mod, what's the latest version?
Title: Re: SMF Likes Plus
Post by: Illori on January 14, 2017, 06:37:11 AM
the one released is the latest version.
Title: Re: SMF Likes Plus
Post by: Anonskii on January 30, 2017, 11:54:53 PM
the one released is the latest version.

Is it possible to remove the like thumbs up icon?

Cheers.
Title: Re: SMF Likes Plus
Post by: Illori on January 31, 2017, 05:24:02 AM
in which location?
Title: Re: SMF Likes Plus
Post by: Anonskii on January 31, 2017, 05:47:57 AM
In postbit
http://i.imgur.com/2YJkr9c.png

Cheers.
Title: Re: SMF Likes Plus
Post by: Illori on January 31, 2017, 06:12:42 PM
find
Code: [Select]
<img src="' . $settings['default_images_url'] . '/likes/like.png" alt="', $txt['likes'], '" /> and remove it from display.template.php
be sure not to remove the whole line just that part
Title: Re: SMF Likes Plus
Post by: profzelonka on February 02, 2017, 01:29:54 AM
Just wanted to say this is a perfect mod! Thank you for your hard work.