I Recommend / Like This Plugin for WordPress

I Recommend/Like this plugin for WordPress

– 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.

 

UPDATE: Version 1.4

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

92 thoughts on “I Recommend / Like This Plugin for WordPress”

  1. @ kremboo99 & Paul,
    So far I only fixed a small bug pointed out by another user and modified the CSS to make it more like tumblr.

    I would be updating and releasing the code on WordPress.org by end of next week.

  2. I cannot get the words “I recommend this” to show up on the bottom of my post. It is only showing a “heart”. I have changed the option from Image to text and saved my changes, but it only shows the image. Have I done something wrong in my installation? Thanks.

  3. Hello….

    Please can you send me the updated Plugin to please.

    My website is only allowing me to like a post once, It wont allow anymore?

    S

  4. Hey,
    I really really appreciate your plugin! I was wondering if it’s possible to add a hover class for the image? Is this something that needs to be added in the javascript? I just want to be able to have three different colors (regular, hover and active). Please let me know if you can 🙂

    Best,
    Eva

  5. I would also like the same functionality and look as Eva. If you reply instructions to her, could you also send them to me? Thanks!

  6. Crashed my blog, too. Here is the error:

    Fatal error: Cannot redeclare setoptionsirt() (previously declared in /home/content/i/w/e/iween25/html/blog/wp-content/plugins/i-recommend-this/i-recommend-this.php:29) in /home/content/i/w/e/iween25/html/blog/wp-content/plugins/i-recommend-this/i-recommend-this.php on line 417

    And you can see that if you visit my blog. Address linked in form.

  7. hi, there is a problem when i click on recomment it the button show me :
    1 recommended
    but when i refresh the page the text was gone and just show the number:
    1
    please fix it and email me .
    thanks for your usefull plugin…

  8. Hello

    Is it possible to have a widget which can show an individual users favorited posts (when logged in), like the WP Favorite Posts (by Huseyin Berberoglu – http://nxsn.com), also, it would be great if users could see other users favorites as well, any possibility of this in later releases? Thanks,

    Kind regards, Joe

    1. Hello Joe,
      The feature you require could certainly be made. It would take some time as this is something I work in my free time but I have noted this so will start experimenting with it soon.

  9. Hi,
    I’m using the I Like This plugin on my site, but as it is discontinued, I would like to switch to this one. Will the current count of “likes” be preserved when I do this?

    1. @Boyan,
      The code was changed and to avoid errors and to avoid errors the naming conventions were changed too.
      However if you do know how to modify a MySQL database, you can change the names of all fields in the database based on the new plugin and that way your data won’t be lost.

  10. hello,

    thanks so much for continuing on with this plugin. great work! would you be able to provide the code needed to add the sidebar widget directly into the template file please?

    thanks in advance.

  11. Hello,
    Is there a possibility of accessing the data file, as in the amount of likes per certain post? To decrease/Increase?

  12. Hi, thanks for this plugin, started trying it out recently.

    Just noticed an error message today:

    Warning: Division by zero in / … /wp-content/plugins/i-recommend-this/i-recommend-this.php on line 393

    Using v 1.4.5 of plugin and v 3.4.2 of WP.

    1. Hello Karl,

      This seems to be a strange error. Can you try disabling other plugins and test again if it works?
      The line on which you mentioned about an error is from the analytic sub plugin. If you could edit the plugin manually, I would suggest you delete, I would suggest you delete lines from 367 to 416 in the i-recommend-this.php file and that should fix your error.

    1. Hello. A new version of the plugin would be added to WordPress.org within next 2 days. I would suggest you wait until then. The new version has very modular code and also more efficient.

  13. Hi,

    So far great plugin. Thank you. I’m using it to create simple like counter at the bottom of my posts in my blog, but can’t figure out how to change the location so it sits under the meta tags rather than above. Ideally I would like it to float above the comments div. Can you help me?

    Thanks,
    Aideen
    http://www.aideenmcfadden.com

    1. Hello,

      Please wait for few hours. I am about to commit a major revamp of the plugin on WordPress.org. Once its up, you would be able to add the counter where ever you wish in the template using a code.

  14. Thanks for a the plugin. A few notes…

    1. put the shortcode and function examples on the installation page, on the FAQ, and on this page. The only place they are listed right now is in the wordpress configuration after installation.

    2. the shortcode listed on that configuration page is wrong. you changed it to “dot_recommends”

    3. some functionality I added that you might want to include is specifying a specific post id. With this you can put the like button for a specific post/page anywhere even when not in the loop. To do that you need to add the param to the allowed shortcode attrs, add the paramater to dot_recommend, and fix the post id references in dot_recommend. Relevant code below

    function shortcode( $atts ) {
    extract(shortcode_atts(array(‘id’ => null), $atts));
    return $this->dot_recommend($id);
    }

    function dot_recommend($id=null)
    $post_ID = $id ? $id : get_the_ID();
    change $post->ID to $post_ID in two places

    1. Bryant, thank you so much for sharing the code. I definitely would update the plugin with this code and also update the help pages. If there is anything else you could suggest, please feel free.

    2. Hello Bryant, Do you have to check updated code? Would love to have your inputs before I publish to the WP repo.

      Also regarding the ID, how would you add a shortcode with the ID in it?

  15. Hey,

    love that plugin, but I get some strange errors after updating a post, it shows me:

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, class ‘DOT_IRecommendThis’ does not have a method ‘dot_setup_recommends’ in /wp-includes/plugin.php on line 403

    and

    Warning: Cannot modify header information – headers already sent by (output started at wp-includes/plugin.php:403) in wp-includes/pluggable.php on line 881

    how can I fix that?

    Thanks a lot.

    1. Hello Marian,

      Thank you for letting me know. I have been able to replicate that error too. The fix is simple, if you want to do it yourself let me know or else if you wait for a day I would be submitting a new fixed version on WordPress.

    1. You would have to do database query for that in your theme. I would suggest creating a widget area(sidebar) instead and then adding the widget into it.

  16. Great plugin, thanks for continuing Benoit’s work.

    Disabling CSS doesn’t work. Checking or unchecking the “Disable CSS” checkbox has no effect. Can you please fix it?
    Kind regards

  17. Hi,
    I’ve been using “I Like This” plugin for a while and I was looking for a widget that displays most liked posts on the first page and found yours. It looks great but is there any way to import the likes from “I like this” to your plugin? I can use the database if you tell me the table names.
    Thanks

    1. Hey Mohammad,

      Please follow below steps:

      1. If you have already installed my plugin, then delete the database table “irecommendthis_votes”.
      2. Rename table ilikethis_votes to irecommendthis_votes

      And you are good to go. I will try creating an upgrade option in next version but it will take some time.

      1. Hi Harish,

        Thank you for the quick response. I renamed the table and new likes are being appended to the table and everything looks fine when I check the table but the old posts with likes show 0 likes

        Thanks

      2. Sorry. Missed one thing.

        You will need to go to postmeta table and change all the meta options where meta_key is “_liked” to “_recommended”.

        Do let me know the MySQL query you use to do this.

      3. Another problem I am facing is that the most recommended posts are not ordered by the number of likes as I check the database. I have a post with 12 likes which is shown before a post with 25 likes.

    1. Hello Aia, unfortunately nope. However you can add your custom css. Drop me your email or email me using the contact us form on this site with the size you require and will try to send you the code and image this weekend.

  18. Hi – I’m just getting the number 0 instead of a heart or thumbs up. When clicked, the page just back to the top and the counter stays at 0. I’ve used the plugin on another site (with near identical design) with no problems, so I have no idea what happened.

    Thanks!

      1. Hi there.
        I checked both sites. The issue you are facing could be because of absence of JQuery file and also the JavaScript & CSS files of my plugin.
        I am assuming that your theme does not have wp_head in the header. Please check the header of both themes.

  19. Sorry—bit of a novice here… I’ve installed I Recommend This plug in via WordPress and set it for the heart button to appear on all posts, but nothing shows up on existing posts (I haven’t posted anything new since installing the plug-in). Is there something else I’m supposed to do? Do I have to do anything with the Shortcode and Template Tags? And is there a manual or some other instructions I should be reading rather than bothering you with such basic questions? Many thanks!

    1. Hello Kelly,

      No need to apologize.Can you please post your website link so I can check.

      Once you activate the plugin, from the page you set the hearts option, on the top there is a “Automatically Display” option. You would have to set this for the heart icon to display.

  20. Hi Harish, I’m working on a website and the ‘i recommend this’ heart is working great on their category page or single posts, but not on the home page.. I started a support thread on WP 3 days ago and just wondering if you’ve seen it? It’s prob something really simple.. 🙂 would appreciate any feedback: http://wordpress.org/support/topic/i-reccomend-this-not-showing-up-on-home-page-single-pagecategory-pages-works?replies=1 Thanks 🙂

  21. Hi harishchouhan,

    Your plugin works very well on my site.

    And I want to display posts has beend recommended in recently day/week/month

    Could you please help me how to do this ?

    1. That would require lot of custom coding. Basically you would have to create your own widgets and query the database to analyze data and then display it according to your requirements. There are no immediate plans to add these features as they would take a while to develop.

  22. Love this plugin and the awesome support you’re giving to users!

    A question: Is it possible to just have the icon without the number 0 when no one has liked/recommended the post yet?

    Thank you in advance!

    1. Hello Kaye, thanks for your kind words.

      Regarding your query, few more users had asked same thing so am working on some improvements. By next week I would be rolling an update with this feature. If you have the plugin installed you would be notified or you can stay in touch through twitter.

      1. Whoa. That was lightning fast! I will be waiting in rapt anticipation for that update. You’re my hero!

        I’ve just followed you on Twitter 🙂

    1. Hello Mia,
      I am not sure how to do it, but will look into it next week and if simple will update the plugin.

  23. Hi,

    Thanks for this useful plug-in. I would just like to point out that the .live() method in the ” dot_irecommendthis.js ” file is deprecated and has been removed from jQuery. Please consider using the .click() method instead.

    thanks

    1. Hey thanks for pointing that out. Another user has mentioned this but I forgot about it. Will plan it for next update,

  24. yup need some help installing it… what is the html code ??? i am completely new at this and im not using wordpress im using socialengine.com

    1. Hello, For any styling customization I would suggest you use CSS and target the exact element. A class .dot-irecommendthis is added to the link. So you can add styling for it in your own theme.

  25. Hi,

    I’m not an expert of HTML/CSS. I just wanted to know how to display the heart icon at the center of my page, and how to have a bigger icon and number of votes ?
    Thank you !

Leave a Reply

Your email address will not be published. Required fields are marked *