News:

Welcome to the Unofficial Help Forum



Author Topic: SMF Likes Plus  (Read 122469 times)

Offline Illori

  • Administrator
  • *
  • Posts: 322
    • View Profile
Re: SMF Likes Plus
« Reply #15 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

Offline BGH

  • Jr. Member
  • *
  • Posts: 15
    • View Profile
Re: SMF Likes Plus
« Reply #16 on: March 25, 2013, 03:59:44 AM »
Done, and edited previous post.

Regards.

Offline Illori

  • Administrator
  • *
  • Posts: 322
    • View Profile
Re: SMF Likes Plus
« Reply #17 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.


Offline BGH

  • Jr. Member
  • *
  • Posts: 15
    • View Profile
Re: SMF Likes Plus
« Reply #18 on: March 25, 2013, 03:15:15 PM »
Looks very cool, Illori. Looking forward to the update :).

Offline meetdilip

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: SMF Likes Plus
« Reply #19 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.

Offline Illori

  • Administrator
  • *
  • Posts: 322
    • View Profile
Re: SMF Likes Plus
« Reply #20 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.

Offline meetdilip

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: SMF Likes Plus
« Reply #21 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.
« Last Edit: March 26, 2013, 12:28:04 AM by meetdilip »

Offline Illori

  • Administrator
  • *
  • Posts: 322
    • View Profile
Re: SMF Likes Plus
« Reply #22 on: March 26, 2013, 05:34:47 AM »
well none of those will be features of this mod.

Offline meetdilip

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: SMF Likes Plus
« Reply #23 on: March 28, 2013, 06:39:05 AM »
No issues. Just suggestions can take or leave :)

Offline Illori

  • Administrator
  • *
  • Posts: 322
    • View Profile
Re: SMF Likes Plus
« Reply #24 on: March 29, 2013, 02:52:52 PM »
new version attached to the first post.

Offline BGH

  • Jr. Member
  • *
  • Posts: 15
    • View Profile
Re: SMF Likes Plus
« Reply #25 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

Offline Illori

  • Administrator
  • *
  • Posts: 322
    • View Profile
Re: SMF Likes Plus
« Reply #26 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.

Offline BGH

  • Jr. Member
  • *
  • Posts: 15
    • View Profile
Re: SMF Likes Plus
« Reply #27 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.

Offline Illori

  • Administrator
  • *
  • Posts: 322
    • View Profile
Re: SMF Likes Plus
« Reply #28 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.

Offline frostybore

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: SMF Likes Plus
« Reply #29 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.