Drupal Like Button
Entity vote results
Sorting content by likes

Add a Like button to Drupal content and comments!
Get instant statistics and insights!
Sort content by likes!

Homepage

https://likebtn.com/en/drupal-like-button-module

Features

  • More than 60 parameters, 28 themes, 37 languages.
  • Allows visitors to like and dislike anonymously the following Drupal entities: nodes, comments.
  • Defines a field type containing the Like Button.
  • Sorting content by vote results using Voting API or LikeBtn field.
  • Shortcode to display the Like button inside content: [likebtn]
  • Customizable position and alignment.
  • Full access to the Like button CSS.
  • Fully localizable.
  • Custom texts.
  • Allows to collect donations using donate buttons in the popup.

Demo

Live Demo | Showcase

Help

Documentation | FAQ | Hire Developer | Contact Us

The plugin 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.

Shortcode

  • Enable the LikeBtn module.
  • Configure the text formats (Filtered HTML and Full HTML) so the LikeBtn shortcodes filter is enabled 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.
  • Use the following shortcode to insert the Like Button inside the node content: [likebtn]
    You can pass Like Button settings as parameters in the shortcode:
    [likebtn identifier="my_button" style="large" i18n_like="Yeah!"]
    If identifier parameter is not specified, node ID is used. Use space to separate parameters, do not use commas or any other characters.

Sorting content by likes in views

Sort comments by likes

  • Upgrade your website to the tariff plan allowing to retrieve Statistics.
  • On the plugin configuration page enable synchronization of likes into your website database.
  • Choose content type and click "Edit" in "Home » Administration » Structure » Content types".
  • On "Comment settings" tab enable and configure sorting comments by likes/dislikes.

Get Likes and Dislikes count in template

Suppose you are using "bartik" theme and you want to display Likes and Dislikes count on the Article page:

1. Upgrade your website to PRO or higher plan (https://likebtn.com/en/pricing)
2. Enable "Automatic syncing of likes into local database" on LikeBtn module configuration page (/admin/config/services/likebtn)
3. Insert the following code in the /themes/bartik/templates/node.tpl.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

LikeBtn

Like Button module app is powered by LikeBtn company. We at LikeBtn are providing Like Button Rating widgets for several years already for more than 100 000 websites worldwide.

Project information

Downloads