Drupal Like Button module


Add a Like button to Drupal content and comments!

Get instant statistics and insights!

Sort content by likes!

Download Live Demo

11 Years of Success!

41 themes

                                                                                                                    
     

Compatibility



Drupal 7

Mobile Friendly

Sorting content by likes

Sort nodes by vote results using Voting API or LikeBtn field type.

Sorting articles by likes

92 parameters

  • Adjust any single aspect of the Like Button to best suit your needs.
  • Create whatever text you want for the like & dislike button.
  • Customize appearance with CSS.

Verified by Drupal

Like Button plugin is listed in Drupal Modules Directory which gurantees that it has been examined and checked by Drupal Team and 100% safe.

Like Button in Drupal Modules Directory

Shortcode

Shortcode to display the Like button inside content: [likebtn]

Shortcode

Like Button Field

Module defines a LikeBtn field type containing the Like button which can be added to any Content type.

Like Button Field

Google Rich Snippets

Make your site look appealing to the visitors on search engine results pages!
Boost search engine rankings!
Increase clicks!

Google Rich Snippets
Learn more on Google Rich Snippets

Screenshots

Statistics
General Settings
Like Button Settings

Documentation

The plugin is powered by Likebtn.com. The plugin is commercial and provides a 7-day TRIAL. After TRIAL ends your website is switched to the FREE plan and you can continue using FREE or upgrade.
  1. Enable the LikeBtn module.
  2. Enable LikeBtn shortcodes for the Filtered HTML and Full HTML text formats through "Home » Administration » Configuration » Content authoring » Text formats" (admin/config/content/formats). Make LikeBtn shortcodes filter the last filter in the "Filter processing order" list.


  3. Use the following shortcode to insert the Like Button inside the node content: [likebtn]

    You can pass Like button parameters like this:
    [likebtn style="large" i18n_like="Yeah!"]

    Use space to separate parameters, do not use commas or any other characters.
Button identifier parameter is used for statistics analysis. If identifier parameter is not specified, node ID is used.
If specifying custom identifier you will see button identifier in statistics instead of content title. You also will be unable to sort content by likes. Make sure to specify a unique identifier for each like button using identifier parameter, otherwise all the buttons will reflect the same number of likes.
The identifer parameter in Drupal LikeBtn module has the following structure: Content type + _ + Content ID

Examples:
  • node_1
  • comment_7
It is recommended to keep this identifier structure when inserting the LikeBtn HTML-code directly into Drupal template, otherwise you may face problems synchronizing voting results from LikeBtn.com into your Drupal database.
  1. Upgrade your website to the tariff plan allowing to retrieve Statistics.
  2. On the plugin configuration page enable synchronization of likes into your website database.
  3. Sort content using Voting API:
    Drupal: Sort content by likes

    Sort content using LikeBtn field:
    Drupal: Sort content using LikeBtn field
  1. Upgrade your website to the tariff plan allowing to retrieve Statistics.
  2. On the plugin configuration page enable synchronization of likes into your website database.
  3. Choose content type and click "Edit" in "Home » Administration » Structure » Content types".
  4. On "Comment settings" tab enable and configure sorting comments by likes/dislikes. Drupal: Sort comments by likes
Suppose you are using "bartik" theme and you want to display Likes and Dislikes count on the Article page:
  1. Upgrade your website to the tariff plan allowing to retrieve Statistics.
  2. On the plugin configuration page enable synchronization of likes into your website database.
  3. Insert the following code in the /themes/bartik/templates/node.tpl.php:
    <?php
    $likebtn_count = likebtn_get_count($node, 'node');
    if (!empty($likebtn_count[0])):
      echo 'Likes:' . $likebtn_count[0]['likes'] . '<br>';
      echo 'Dislikes:' . $likebtn_count[0]['dislikes'];
    endif
    ?>
If you wish to translate "i18n_" parameters of the LikeBtn module into more than one language:
  1. Install Internationalization module.
  2. Enable "Variable translation" module in the "Administration » Modules".
  3. Enable all LikeBtn variables in "Administration » Configuration » Regional and language » Multilingual settings » Variables".
  4. In LikeBtn settings ("Administration » Configuration » Web services » LikeBtn configuration") translate parameters, that are marked with "This is a multilingual variable".
  1. Enable Locale Drupal module.
  2. Find the .po file containing translation into the desired language in /sites/all/modules/likebtn/translations directory.
  3. Import .po file in "Home » Administration » Configuration » Regional and language » Translate interface » Import".

FAQ

In case you have altered the template file (/themes/bartik/templates/node.tpl.php, for example), try to display Like Button manually:
<?php echo $content['likebtn_display']['#markup']; ?>
There is no way to get uid from votingapi_vote table after syncing vote results in Drupal. LikeBtn is like button for anonymous voting, so after synching uid in votingapi_vote table is 0.

Testimonials

Just mention @likebtn in Twitter and we will add your testimonial

Referral Program

Earn Money With LikeBtn!

Place our referral link or a banner on a website, get rewarded with 25% of all payments made by referred members (including all his future payments for renewals of subscription plans).

Referral rewards are paid to you via PayPal at the end of each month. What if I don't have a PayPal account?

Start Earning Now



Didn't find what you need? Visit our FAQ