Likes

  1. ‹ Older
  2. 4 years ago

    Have you tried adding

    $definitions["Unlike"] = "Unlike";
    $definitions["Like"] = "Like";
    $definitions["Members Who Liked This Post"] = "Members Who Liked This Post";
    $definitions["%s likes this."] = "%s likes this.";
    $definitions["%s like this."] = "%s like this.";

    Into your definitions.php instead of creating a definitions.Likes.php?

  3. @Niuwang Have you tried adding

    $definitions["Unlike"] = "Unlike";
    $definitions["Like"] = "Like";
    $definitions["Members Who Liked This Post"] = "Members Who Liked This Post";
    $definitions["%s likes this."] = "%s likes this.";
    $definitions["%s like this."] = "%s like this.";

    Into your definitions.php instead of creating a definitions.Likes.php?

    Might also have something to do with the language installed as some do this.

  4. [deleted]

    13 Feb 2015

    Don't work with Notifications. I'm so sad :(

  5. Edited 4 years ago by Tristan

    Check your browser console. If you see something like this -image- there is an error during Javascript including.

  6. The like button works for me but i would like to also know if and how to add a thumbs up icon?

  7. [deleted]

    1 May 2015

    @Tech The like button works for me but i would like to also know if and how to add a thumbs up icon?

    I just tried editing the plugin.php and adding <i class="fa fa-thumbs-o-up"></i> to this:

    $likes = "<p class='likes".($liked ? " liked" : "")."'>
    		<a href='#' class='like-button'><i class='fa fa-thumbs-o-up'></i> $likeText</a>
    		<span class='like-separator'".( (! ET::$session->userId or ! $members) ? " style='display:none'" : "").">&nbsp;&middot;&nbsp;</span>
    		<span class='like-members'>$members</span>
    	</p>";

    ... but it is not showing.

  8. [deleted]

    1 May 2015

    Looks like your strings are not all properly quoted and concatenated. Everything inside double quotes is a string, and those double-quoted strings and variables have to be concatenated with a . operator.

    Here's my edit, no guarantees this will work :P

    $likes = "<p class='likes".($liked ? " liked" : "")."'>
    		<a href='#' class='like-button'><i class='fa fa-thumbs-o-up'></i> ".$likeText."</a>
    		<span class='like-separator'".( (! ET::$session->userId or ! $members) ? " style='display:none'" : "").">&nbsp;&middot;&nbsp;</span>
    		<span class='like-members'>$members</span>
    	</p>";
  9. [deleted]

    1 May 2015

    @jsonnull I tried your code but it does not work. :(

  10. [deleted]

    1 May 2015

    @Dakoom Is the issue that the icon wasn't showing up for you, or the entire button?

  11. [deleted]

    1 May 2015

    @jsonnull @Dakoom Is the issue that the icon wasn't showing up for you, or the entire button?

    The icon is not showing up! The button/link is working as normal.

  12. This would be really awesome guys a thumbs up icon (are we almost there) ?

  13. Also with the icon in works would you guys also considering making it show how many likes each member has in there post bit and profile?

  14. [deleted]

    1 May 2015

    @Tech Also with the icon in works would you guys also considering making it show how many likes each member has in there post bit and profile?

    I think this would be an entirely different modification.

  15. [deleted]

    1 May 2015

    @Dakoom The icon is not showing up! The button/link is working as normal.

    You can ignore what I was saying then, sorry. :( :P Do you have a repo with the latest code I could test, or a live page I could see?

  16. [deleted]

    1 May 2015

    @jsonnull
    Ok, go here:
    http://www.forumapicoltura.com/9-presentati-in-questa-sezione
    Right now I'm using your code in the Likes/plugin.php file.

  17. [deleted]

    1 May 2015

    @Dakoom @jsonnull
    Right now I'm using your code in the Likes/plugin.php file.

    Thanks for the link, you should update the code again to change it back to what you have above.

  18. [deleted]

    1 May 2015

    @jsonnull $likes = "<p class='likes".($liked ? " liked" : "")."'> <a href='#' class='like-button'><i class='fa fa-thumbs-o-up'></i> $likeText</a> <span class='like-separator'".( (! ET::$session->userId or ! $members) ? " style='display:none'" : "").">&nbsp;&middot;&nbsp;</span> <span class='like-members'>$members</span> </p>";

    Yeah, done... but it's the same. The icon is not showing. :(

  19. [deleted]

    1 May 2015

    @Dakoom Yeah, done... but it's the same. The icon is not showing. :(

    Okay, I looked at the source and for some reason font-awesome isn't included in this. Not 100% sure on how much is or isn't there, but long story short I see what you need.

    Try this:

    $likes = "<p class='likes".($liked ? " liked" : "")."'>
    		<a href='#' class='icon-thumbs-up like-button'> $likeText</a>
    		<span class='like-separator'".( (! ET::$session->userId or ! $members) ? " style='display:none'" : "").">&nbsp;&middot;&nbsp;</span>
    		<span class='like-members'>$members</span>
    	</p>";
  20. [deleted]

    1 May 2015

    @jsonnull
    Try this:

    $likes = "<p class='likes".($liked ? " liked" : "")."'> <a href='#' class='icon-thumbs-up like-button'> $likeText</a> <span class='like-separator'".( (! ET::$session->userId or ! $members) ? " style='display:none'" : "").">&nbsp;&middot;&nbsp;</span> <span class='like-members'>$members</span> </p>";

    Now this works but there is no space from the icon and the text itself. It also changed the font.
    I tried adding a &nbsp; but it doesn't work (it only works when you refresh the page, but if you try clicking on the link it remove the space automatically)

  21. [deleted]

    2 Jun 2015

    hi guys, how can i translate this addon?

    i created a definitions.Likes.php and added the following sentences but don't works:

    $definitions["Unlike"] = "Unlike";
    $definitions["Like"] = "Like";
    $definitions["Members Who Liked This Post"] = "Usuarios que dieron Like";
    $definitions["%s likes this."] = "%s likes this.";
    $definitions["%s like this."] = "%s like this.";
 

or Sign Up to reply!