Download the PHP package heimrichhannot/contao-likes-bundle without Composer

On this page you can find all versions of the php package heimrichhannot/contao-likes-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package contao-likes-bundle

Contao Likes Bundle

Slap a like button on anything in Contao.

This Contao CMS bundle allows you to add like and dislike buttons to any (twig) template, liking or disliking whatever you please to your heart's content.

Features

Installation

You can install this bundle using Composer:

Then update your database and you're good to go.

Usage

To add a like button to your template, include a like & dislike button template and pass options as likes, preferably created by calling huh_likes() with a namespace and a target (these can be literally any strings you like to reference this likeable thing).

On the Matter of liking Models

Most commonly, you will want to add a like button to something related to contao models, like a news article or a calendar event. In this case, we recommend using the model's table name as namespace and the model's ID as target. Or, even better, if you have access to the \Contao\Model instance directly in your template, just pass it in.

Table and ID Model Instance
huh_likes('tl_news', 42) huh_likes(model)

The Dislike Button and other Options

In the provided default template, the dislike button is NOT shown by default. If you want to show it, pass more options to the huh_likes() function:

Accessing Likes and Dislikes

By using the huh_likes() function, you will get an object with the following getters available:

Customization

Within the default template @Contao/huh_likes/buttons.html.twig, you will find four blocks that you can override with your custom icons:

With these blocks, you can easily replace the default icons with your own SVGs or any other HTML content.


All versions of contao-likes-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
contao/core-bundle Version ^5.1
doctrine/dbal Version ^2.13 || ^3.0
psr/log Version ^1.0 || ^2.0 || ^3.0
symfony/config Version ^6.4 || ^7.1
symfony/event-dispatcher-contracts Version ^1.0 || ^2.0 || ^3.0
symfony/filesystem Version ^6.4 || ^7.1
symfony/http-foundation Version ^6.4 || ^7.1
symfony/http-kernel Version ^6.4 || ^7.1
symfony/lock Version ^6.4 || ^7.1
symfony/string Version ^6.4 || ^7.1
twig/twig Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package heimrichhannot/contao-likes-bundle contains the following files

Loading the files please wait ...