Download the PHP package mvo/me-like without Composer

On this page you can find all versions of the php package mvo/me-like. 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 me-like

me like! ▲

What does it do?

This bundle provides a widget that users can click on to like things (backed by an API).

Likes need to be confirmed in order to count - this is accomplished by asking for an email address and sending an email with a link to confirm the like. This doubles as a constraint: each user (email) can only like (each endpoint) once.

There can be multiple endpoints/domains (= things to like) that are identified by a unique string. This can e.g. be a single one (idea), or a fixed or dynamic list (project.1, project.2, …) - the system actually doesn't care. It will ask your code if a given endpoint is valid when listing/adding/confirming likes.

The js widget talks to the server system via an API endpoint. It also acts as a proxy for confirming likes. For this to work, we define a distinct URL fragment for the widget listens on that contains the 'confirm token' (same holds true for the user token; see below).

Security & privacy

Stored things on the server

Stored things at the client

Setup

  1. Require the bundle and register it.

  2. Render the widget to the desired endpoint in your twig template:

  3. Add an endpoint handler (implementing Mvo\MeLike\Endpoint\EndpointInterface) that returns VALID for the endpoints you want to allow. You can also add random data context to the endpoint that will be available in the notification template.

    In case your endpoint's name is in the form <domain>.<id> the individual parts will be passed to your handler.

    Note that a handler will only be asked to add context for an endpoint if handle() returns VALID for this endpoint. You do not need to re-check the validity inside addContext().

  4. If you're not using autoconfiguration, tag the handler it with mvo_me_like.endpoint.

  5. Make sure to load the js widget and minimal styles. The bundle ships with a compiled version (like_widget.js, like_widget.css) which automatically initializes the widgets and has some opinionated styles. Feel free to build your own version (see sources under /layout).

Configuration

  1. The systems sends emails via symfony mailer. Configure the following templates and config keys to fit your needs:

    • Notification template: @MvoMeLike\Email\confirm_like.html.twig
    • Mailer config:
  2. Adapt translations to your needs. The email subject can also be modified this way. If you need context sensitive parameters pass them in your endpoint handler under the key email_subject.

  3. You can also configure the token names (user token + confirm token) that are appended to the URL (e.g. in case you've got some anchors with the same names):

    This will result in a 'confirm url' like so: https://example.com/some/site#tok_u=&tok_c=

    All tokens have a length of 64 characters.


All versions of me-like with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
doctrine/doctrine-bundle Version ^1.8 || ^2.0
doctrine/orm Version ^2.7
sensio/framework-extra-bundle Version ^4.4 || ^5.0
symfony/doctrine-bridge Version ^4.4 || ^5.0
symfony/framework-bundle Version ^4.4 || ^5.0
symfony/mailer Version ^4.4 || ^5.0
symfony/twig-bundle Version ^4.4 || ^5.0
symfony/validator Version ^4.4 || ^5.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 mvo/me-like contains the following files

Loading the files please wait ....