Download the PHP package coercive/cookieconsent without Composer
On this page you can find all versions of the php package coercive/cookieconsent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download coercive/cookieconsent
More information about coercive/cookieconsent
Files in coercive/cookieconsent
Package cookieconsent
Short Description Coercive CookieConsent is a micropackage (css, js, php) to easily manage user consent at the cookie level of a site.
License MIT
Homepage http://coercive.fr
Informations about the package cookieconsent
CookieConsent
CookieConsent is a micropackage (css, js, php) to easily manage user consent at the cookie level of a site.
How to configure popup
Settings
- settings.lang : the website current language (for customize CSS with)
- settings.name : the name of config cookie
- settings.accept : the value for "accept all"
- settings.decline : the value for "decline all"
- settings..._duration : different durations for setted cookie for each choice
etc...
JS requires
The example JS file require some externals scripts :
- JavaScript Cookie v2.2.1 https://github.com/js-cookie/js-cookie
- jQuery v2.1.4 https://github.com/jquery/jquery
Start JS (basic example)
Ask for consent again
Example of a new request for consent at the cookie level, if for example certain content is inaccessible as such and you want to offer the user to reconsider his choice.
Configure CSS
You can copy and rewrite partialy the css file, or just declare some variables.
Customize CSS for current language on main container.
Customize CSS for each popup. (main, or configure).
Add background layout when popup is opened.
Picture
The given cookie image in /dist/img/cookie.png is free of use.