Download the PHP package omatech/oma-cookies without Composer

On this page you can find all versions of the php package omatech/oma-cookies. 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 oma-cookies


Omatech Logo

Oma-cookies

Built-in solution that allows the control of cookies,
enabling GDPR compliance for Omatech internal projects.

Table of contents

Installation

Install the package

JavaScript import

Import the main js file into your project:

Optionally you can copy into a public folder the JS file located inside the /node_modules/@omatech/oma-cookies/dist/js folder and link it in your HTML layout

CSS/SASS import

There are 2 approaches depending on your styling method:

A) If you are ONLY overriding CSS classes => Import the compiled CSS file

Optionally you can copy into a public folder the CSS file located inside the /node_modules/@omatech/oma-cookies/dist/css folder and link it in your HTML layout

B) If you want to override the variables and CSS classes => Import all the separated files

Regardless of what option you choose, make sure this line is in your HTML layout so the responsive works properly.

Implementation

To start things up, you must add this somewhere in your HTML layout (preferably at the end)

Iframes

Every iframe must have the attribute data-omacookies-consent which has 2 possible values marketing or statistics. This specitfy when the content will be un/blocked

YouTube videos

The attribute data-omacookies-yt-video-id is the ID found at the end of every YouTube video URL. In /watch?v=uu5k19UaCT0 the ID would be uu5k19UaCT0

Generic iframe

The attribute data-omacookies-src would work as the normal iframe src attribute

You can add any attribute to the rendered iframe using the attribute data-omacookies-xxx. Simply change xxx for any other attribute. See the attribute width shown in the example.

Scripts

It is required to add the type="text/plain" attribute.

↑ Back to top

Methods

↑ Back to top

Configuration

Somewhere after the import of the omacookies JS file we will override attributes from the main object.

Override language strings

We can set a new value for any language string with the following declaration:

Adding a new language

We can add as many languages as we want, we just need to follow the same object structure we already have for ES and EN.

You can copy the structure from /node_modules/@omatech/oma-cookies/src/lang/en.json

For example, we will add German language:

Setting the default language

Make sure to set the language after you make any modifications to the available_languages object.

Read more link

Here we will add the website link where the user will be redirected to read the cookie policy.

Format

Here we can set the appearance of the initial cookie dialog. The allowed values are modal (default) or banner.

The quick link is enabled by default. Disable it setting the following:

To open the cookies selection modal when disabled, use the this method

Here we can configure in which corner of the screen will the quick link be located, using the values top-right , top-left, bottom-right or bottom-left. The quick link will appear on the bottom-right by default.

↑ Back to top

License

This project has MIT license. For further information, read the LICENSE file.

↑ Back to top

Contact

↑ Back to top


All versions of oma-cookies with dependencies

PHP Build Version
Package Version
No informations.
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 omatech/oma-cookies contains the following files

Loading the files please wait ....