comments 66

I Recommend This

- taking forward the work of Benoit “LeBen” Burgener

This plugin allows your visitors to simply Recommend/like your posts instead of commment it. I wanted a tumblr like feature and wanted something similar for WordPress.

Background

Benoit “LeBen” Burgener had created a similar plugin http://wordpress.org/extend/plugins/i-like-this/ that works similarly like the like feature on tumblr. However its development has been discontinued. I had customized the CSS of this plugin to make it work a little more like tumblr and had requests by few other developers the code. So after taking permission from Benoit for further development of the plugin I have recently applied at WordPress to create a new plugin with the updated code.

This plugin include

  • A counter/button to display the number of “like” and to vote.
  • A widget and a function to display the X most liked posts.
  • A preference pane with some options

If you are interested in this plugin (the way its used on this website, simply leave a comment below with your email so I could get back to you with the download file)

 

UPDATE:

You can download this from here http://wordpress.org/extend/plugins/i-recommend-this/

Please post your comments so we can enhance this plugin together as  a community.

 

LATEST UPDATE: Version 2.4.1

If you wish to customize the link color, recommend image (heart), you can do so by using below classes in your style sheet. make sure to add !important to every style.

.iRecommendThis
a.recommendThis
a.recommendThis.active

 

Tips & Tricks:

How to Remove the Icon:

  1. Go to the Plugin Settings page “I recommend this” under “Settings” menu.
  2. Check the “Disable CSS” checkbox
  3. Add below CSS code to your theme’s stylesheet.
.dot-irecommendthis {
 background:none;
 padding:0 0 0 10px;
 border: 0 !important;
 margin-bottom: 10px;
 display: inline-block;
 text-decoration: none;
}
.dot-irecommendthis:hover,
.dot-irecommendthis.active {
 color: #F56559 !important;
}

[wpws url=”http://wordpress.org/plugins/i-recommend-this/stats/” selector=”td .last-child” user_agent=”Bot at mysite.com” on_error=”error_show”]

Filed under:

66 Comments

  1. thetruthshallsetyoufreeindeed

    Hi, how do you filter unique likes? Is it just via username?
    We have a private site for our company and we’re using one single Internet/Public IP, and once a user liked a post the others can’t like the post anymore.

    Please help.
    Thanks!

    • harishchouhan

      Hello currently we filter unique likes using IP. And I understand how it would affect you if all users have a single IP.
      I am rolling out an update soon that wll allow users to disable the IP requirement. The update would be released before the end of this month, maybe sooner.

      • thetruthshallsetyoufreeindeed

        This is great news! Will look forward to this, hopefully the feature to filter by username can be considered too. :)

  2. Ash

    Can you please give me the CSS code to make the heart twice as big and in different color if possible? I am a complete noob at css. thanks and awaiting your response. Great plugin btw. Can’t wait for the update.

    • harishchouhan

      Hello,

      The current CSS code is

      .dot-irecommendthis {
      background:url(../images/default.png) 0 0px no-repeat;
      padding:0 0 0 20px;
      border: 0 !important;
      margin-bottom: 10px;
      display: inline-block;
      text-decoration: none;
      }
      .dot-irecommendthis:hover, .dot-irecommendthis.active { background-position:0 -24px; color: #F56559 !important; }

      You would have to add your own class and your own heart image.

  3. 倡萌 胡

    I translate it into Simple Chinese, Named it dot-irecommendthis-zh_CN.mo ,and put it in this plugin‘s languages folder, but It doesn’t work.

  4. Timo

    Hello,
    i want to filter unique votes via ip saving. because users could have disabled cookies. then they can vote unlimited.
    but i want to know if the table with the ip adresses is cleared after 24 hours or something like this. because an other user can have an ip adress the other day from an user who already voted.
    can u say me something about this?

    • harishchouhan

      Currently the IP address records are saved permanently. You can write your own script or plugin to remove all records from the table in which the IP’s are saved.

    • harishchouhan

      Hi. Under “Settings” menu you would find a sub menu titled “I Recommend This”. From here you can disable the automated display on posts by unchecking the Automatically display on “Posts” checkbox.

  5. How would I display just the number of recommendations (not the button)? I would like to put this on my main page next to comments. Example: 3 Comments – 5 Recommendations. Is there a function i can use to accomplish this?

  6. Hope someone can assist, I’m getting the following error when clicking on the “like” link: Fatal error: Call to undefined function remove_filter() also I don’t see any thumb or heart images next to the 0.

  7. ystream

    Hi ,

    I have a front page that has displays thumbnails and excerpts from all posts (see http://ystream.staging.wpengine.com ) . I have added this to my loop inside:

    The thumb shows up but all thumbs are using the same post ID , and thus all thumbs display the same count. As if it doesn’t get the specific post’s id.
    How can I get this right?

    THANKS

    johan

  8. Emil

    Hi! Thanks for a very nice plugin. I ran into some trouble with it however. If you click to vote very fast multiple times it registers several votes. I’m using this for a contest currently and I’m afraid someone will discover this and use it to cheat. Can I solve it with some code perhaps? There’s a delay between clicking and the text turning unclickable, can this delay be removed altogether? Thanks for any help with this!

          • Emil

            Would you consider discussing this issue with me over e-mail? I’d post a link but the site is live so it’s kind of a sensitive issue.

          • Emil

            I fixed it by changing this:

            if(link.hasClass(‘active’)) return false;

            To this:

            if(link.hasClass(‘active’)) return false;
            link.addClass(‘active’);

            I tested it in all browsers and my problem seems to have vanished. I guess by adding active directly after the click I prevented the “cheat”. Hopefully this new code doesn’t bite me in the ass :D

    • harishchouhan

      Hi. As of now since the plugin allows guest voting, its hard to get users name. In future will create a similar plugin for logged in user. No time set for it, but I hope to work on it soon.

  9. Stein Peeters

    Hi, I have a wordpress image gallery that I’m using. I would like to use this plugin to add hearts to all images. Is there any way to get this done?

    • harishchouhan

      Nice idea. The plugin won’t be useful as-is in your case. But if you are a developer you could customize the plugin. WordPress saves each image as an attachment (post type) and since the like button is generated dynamically by pulling the post ID from the loop if you find a way to somehow pass the post ID (of image attachment) then it could work.

        • harishchouhan

          Hi,

          As you would know, to manually place the like button, you have to use this

          Can you somehow retrieve the ID of the attachment and include it in the above code like and test. If this works, you won’t have to do anything else.

          • Guest

            I tried it first with a number like you did ’10’ but in the code I can see that the post ID is still used:

          • Stein Peeters

            I tried it first with a number like you did ’10’ but in the code I can see that the post ID is still used: id = dot-irecommendthis-1092

            You can check it on nicholasensylvie.be/the-wedding

          • harishchouhan

            Hi. I tried it locally. A correction, the ID can be supplied only when using shortcode. So please visit https://gist.github.com/hchouhan/8161356. use that code. But make sure to replace the ID value with the respective image attachment ID. Do let me know once you have it online, and I will share the link on the plugin page so others can see.

  10. Bigrice

    Thanks for the plugin. I wonder if I can use this plugin on Woocommerce product catalog/shop page? B/c I hope the visitors can ‘recommand’ the product.

    Thank you

    • harishchouhan

      Hi @disqus_K3OxURiClP:disqus. Yes the plugin can work with WooCommerce products. WooCommerce products are similar to posts and saved in same database tables. You would just have to copy the code and drop in your WooCommerce template.

  11. xinwenfeed

    Wouldn’t it be super cool if the “most recommended posts” could be a ‘post category’ , that could be displayed apart from the sidebar list ??

    • harishchouhan

      Hi, that is actually a very nice suggestion. I am not sure how much time it would take as many are using it for CPT. But I will surely look into this.

Leave a Reply