GithubHelp home page GithubHelp logo

arustler / code200-eucookielawmadness Goto Github PK

View Code? Open in Web Editor NEW

This project forked from webeks/code200-eucookielawmadness

0.0 0.0 0.0 29 KB

EU cookie law extension for October CMS

License: MIT License

PHP 100.00%

code200-eucookielawmadness's Introduction

EU law cookie madness

EU laws require sites to let the user know if cookies are stored on their devices. Depending on EU country there are different types of compliance implementation. Usually scripts like this one only offer notifications and they dont implement real opt-in or opt-out compliance.

This script offers OctoberCMS implementation of Cookie Consent JS, additional Twig template function for easier checks whether or not to serve cookies and additional JS that cleans all cookies if user declines to accept cookies.

Configuration

This plugin integrates the popular Cookie Consent tool in your theme. It requires the theme to have the scripts and styles placeholder.

Simply configure the settings from the backend interface and then it automatically runs on the frontend. Please see how to prevent cookies section as well. Remember that you are soly responsible for any law and regulation compliance.

Compliance types

  • info (allways serve cookies)
  • opt-in (dont serve cookies unless explicit permission)
  • opt-out (serve cookies unless visitor declines serving)

Prevent cookies

This is only Javascript frontend (as all other plugins)! It sets cookies based on user decision whether to allow or reject cookies. You will need to code your PHP to check upon users decision before setting any cookies.

There is a view helper allow_cookies that you can call from twig template.

Example:

{% if allow_cookies()  %}
// javascript for serving cookies like Google Analytics etc
{% endif %}  

If you need to access user decision, cookie is named cookieconsent_status unless you renamed it in configuration.

Cookie can have values:

  • dismiss
  • allow
  • deny

Attribution

The Cookie Consent JS we link to is developed by Insites and released under MIT.

Icon made by Freepik from www.flaticon.com and released under CC 3.0.

code200-eucookielawmadness's People

Contributors

webeks avatar gergo85 avatar arustler avatar kitisak avatar vojtasvoboda avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.