├── .gitignore ├── pages ├── index.php ├── help.readme.php ├── help.templates.php ├── global_configuration.php ├── configuration_test.php └── configuration.php ├── assets ├── css │ ├── cookie_consent_backend.css │ ├── cookie_consent_insites_clean.css │ └── cookie_consent_insites.css └── js │ ├── cookie_consent_backend.js │ └── cookie_consent_insites.js ├── docs └── templates.md ├── install.php ├── LICENSE ├── package.yml ├── boot.php ├── .travis.yml ├── .php_cs.dist ├── update.php ├── README.md ├── lang ├── en_gb.lang ├── sv_se.lang ├── es_es.lang └── de_de.lang └── lib └── cookie_consent.php /.gitignore: -------------------------------------------------------------------------------- 1 | .php_cs.cache -------------------------------------------------------------------------------- /pages/index.php: -------------------------------------------------------------------------------- 1 | parse($file); 5 | $fragment = new rex_fragment(); 6 | $fragment->setVar('body', $body, false); 7 | $content = $fragment->parse('core/page/section.php'); 8 | echo $content; 9 | -------------------------------------------------------------------------------- /pages/help.templates.php: -------------------------------------------------------------------------------- 1 | parse($file); 5 | $fragment = new rex_fragment(); 6 | $fragment->setVar('body', $body, false); 7 | $content = $fragment->parse('core/page/section.php'); 8 | echo $content; 9 | -------------------------------------------------------------------------------- /assets/css/cookie_consent_backend.css: -------------------------------------------------------------------------------- 1 | .rex-form-group:not(.rex-form-group-vertical).cookie_consent_display_none, 2 | .cookie_consent_display_none { 3 | display: none; 4 | } 5 | .cookie_consent_display { 6 | display: inline-block; 7 | } 8 | .mode_notice { 9 | display: none; 10 | } 11 | .mode_optin_notice { 12 | display: none; 13 | } 14 | label[for=embed_auto] { 15 | margin-top: 20px; 16 | } -------------------------------------------------------------------------------- /docs/templates.md: -------------------------------------------------------------------------------- 1 | 2 | # Vorlagen 3 | 4 | ## Javascript Callbacks 5 | 6 | Diese Beispiele können in der Konfiguration in das Feld "Benutzerdefinierte Optionen" eingegeben werden. 7 | Weitere Infos zu Javascript-Callbacks [hier](https://cookieconsent.insites.com/documentation/javascript-api/) 8 | 9 | ### Seite neuladen 10 | Wenn der Cookie-Banner bestätigt wurde, wird die Seite neu geladen. Hierdurch können serverseitig weitere Inhalte (Skripte, Marketing-Tools, etc.) eingebunden werden. 11 | 12 | ###### Konfigurationscode 13 | ``` 14 | onStatusChange: function(status, chosenBefore) { 15 | if(status === "allow") { 16 | location.reload(); 17 | } 18 | } 19 | ``` 20 | 21 | ###### PHP-Code 22 | ``` 23 | if (cookie_consent::getStatus() === cookie_consent::COOKIE_ALLOW) { 24 | // Ausgabe von zusätzlichen Skripten, Marketing-Tools 25 | } 26 | ``` -------------------------------------------------------------------------------- /install.php: -------------------------------------------------------------------------------- 1 | hasConfig()) { 4 | $this->setConfig('color_background', ''); 5 | $this->setConfig('color_main_content', ''); 6 | $this->setConfig('color_button_background', ''); 7 | $this->setConfig('color_button_content', ''); 8 | $this->setConfig('position', 'top'); 9 | $this->setConfig('main_message', 'This website uses cookies to ensure you get the best experience on our website '); 10 | $this->setConfig('button_content', 'Accept'); 11 | $this->setConfig('link_content', 'Privacy Policy'); 12 | $this->setConfig('eLink', ''); 13 | $this->setConfig('iLink', ''); 14 | $this->setConfig('script_checkbox', ''); 15 | $this->setConfig('theme', 'classic'); 16 | $this->setConfig('color_scheme', 'custom'); 17 | $this->setConfig('mode', 'info'); 18 | $this->setConfig('allow_content', 'Allow cookies'); 19 | $this->setConfig('deny_content', 'Decline'); 20 | } 21 | 22 | $somethingIsWrong = false; 23 | if ($somethingIsWrong) { 24 | throw new rex_functional_exception('Something is wrong'); 25 | } 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Friends Of REDAXO 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /package.yml: -------------------------------------------------------------------------------- 1 | package: cookie_consent 2 | version: '3.0.0-beta3' 3 | author: Friends Of REDAXO 4 | supportpage: https://github.com/FriendsOfREDAXO/cookie_consent 5 | 6 | # Seiten 7 | page: 8 | title: 'Cookie Consent' 9 | icon: rex-icon fa-empire 10 | perm: cookie_consent[] 11 | subpages: 12 | configuration: 13 | title: 'translate:configuration' 14 | icon: rex-icon fa-cogs 15 | global_configuration: 16 | title: 'translate:global_configuration' 17 | icon: rex-icon fa-cog 18 | configuration_test: 19 | title: 'translate:configuration_test' 20 | icon: rex-icon fa-eercast 21 | help: 22 | title: 'translate:help' 23 | icon: rex-icon fa-wrench 24 | subpages: 25 | readme: 26 | title: 'translate:help' 27 | templates: 28 | title: 'translate:templates' 29 | 30 | 31 | requires: 32 | redaxo: '^5.1' 33 | 34 | installer_ignore: 35 | - .gitignore 36 | - .php_cs.dist 37 | - .travis.yml 38 | -------------------------------------------------------------------------------- /boot.php: -------------------------------------------------------------------------------- 1 | getAssetsUrl('css/cookie_consent_backend.css')); 9 | rex_view::addJsFile($this->getAssetsUrl('js/cookie_consent_backend.js')); 10 | } 11 | 12 | if (!rex::isBackend()) { 13 | rex_extension::register('PACKAGES_INCLUDED', function ($params) { 14 | if (rex_config::get('cookie_consent', cookie_consent::getKeyPrefix().'embed_auto') == '1') { 15 | rex_extension::register('OUTPUT_FILTER', 'cookie_consent::ep_call', rex_extension::LATE); 16 | } 17 | 18 | rex_extension::register(['FE_OUTPUT', 'OUTPUT_FILTER'], function () { 19 | if (cookie_consent::getMode() === cookie_consent::MODE_OPT_IN && !cookie_consent::hasUserSession()) { 20 | rex_extension::register('OUTPUT_FILTER', 'cookie_consent::ep_optin', rex_extension::LATE); 21 | } 22 | }, rex_extension::EARLY); 23 | }); 24 | } 25 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | sudo: false 4 | 5 | git: 6 | depth: 3 7 | 8 | branches: 9 | only: 10 | - master 11 | 12 | cache: 13 | directories: 14 | - $HOME/.php-cs-fixer 15 | - $HOME/.composer/cache 16 | 17 | before_install: 18 | - phpenv config-rm xdebug.ini || echo "xdebug not available" 19 | 20 | jobs: 21 | include: 22 | - php: 7.3 23 | env: LINTING=1 24 | script: if find . -name "*.php" ! -path "*/vendor/*" -exec php -l {} 2>&1 \; | grep "syntax error, unexpected"; then exit 1; fi 25 | 26 | - php: 7.3 27 | env: CODING_STANDARDS=1 28 | install: 29 | - mkdir -p "$HOME/.php-cs-fixer" 30 | # CS_FIXER_VERSION defined via travisci web interface 31 | - "echo '{\"require\": {\"friendsofphp/php-cs-fixer\": \"'$CS_FIXER_VERSION'\"}}' > \"$HOME/.php-cs-fixer/composer.json\"" 32 | - travis_retry composer update --no-interaction --working-dir "$HOME/.php-cs-fixer" 33 | script: php "$HOME/.php-cs-fixer/vendor/bin/php-cs-fixer" fix --cache-file "$HOME/.php-cs-fixer/.php_cs.cache" --dry-run --diff --verbose 34 | -------------------------------------------------------------------------------- /.php_cs.dist: -------------------------------------------------------------------------------- 1 | in([__DIR__]); 4 | return PhpCsFixer\Config::create() 5 | ->setUsingCache(true) 6 | ->setRiskyAllowed(true) 7 | ->setRules([ 8 | '@Symfony' => true, 9 | '@Symfony:risky' => true, 10 | 'array_indentation' => true, 11 | 'array_syntax' => ['syntax' => 'short'], 12 | 'blank_line_before_statement' => false, 13 | 'braces' => ['allow_single_line_closure' => false], 14 | 'concat_space' => false, 15 | 'function_to_constant' => ['functions' => ['get_class', 'get_called_class', 'php_sapi_name', 'phpversion', 'pi']], 16 | 'heredoc_to_nowdoc' => true, 17 | 'logical_operators' => true, 18 | 'native_constant_invocation' => false, 19 | 'no_blank_lines_after_phpdoc' => false, 20 | 'no_php4_constructor' => true, 21 | 'no_superfluous_elseif' => true, 22 | 'no_unneeded_final_method' => false, 23 | 'no_unreachable_default_argument_value' => true, 24 | 'no_useless_else' => true, 25 | 'no_useless_return' => true, 26 | 'phpdoc_annotation_without_dot' => false, 27 | 'phpdoc_no_package' => false, 28 | 'phpdoc_to_comment' => false, 29 | 'phpdoc_trim_consecutive_blank_line_separation' => true, 30 | 'phpdoc_types_order' => false, 31 | 'phpdoc_var_without_name' => false, 32 | 'psr4' => false, 33 | 'semicolon_after_instruction' => false, 34 | 'space_after_semicolon' => true, 35 | 'string_line_ending' => true, 36 | 'yoda_style' => false, 37 | ]) 38 | ->setFinder($finder); 39 | -------------------------------------------------------------------------------- /update.php: -------------------------------------------------------------------------------- 1 | getCode().'_'; 9 | $yrewrite = rex_addon::get('yrewrite'); 10 | if (rex_addon::exists('yrewrite') && $yrewrite->isInstalled() && rex_string::versionCompare($yrewrite->getVersion(), '2.3', '>=')) { 11 | rex_yrewrite::init(); 12 | $domain = rex_yrewrite::getCurrentDomain(); 13 | if (!$domain) { 14 | $domain = rex_yrewrite::getDefaultDomain(); 15 | } 16 | $prefix .= $domain->getId(); 17 | } 18 | $prefix .= '_'; 19 | 20 | $configs = $this->getConfig(); 21 | foreach ($configs as $key => $value) { 22 | if (strpos($key, $prefix) !== 0 && strpos($key, 'global_') === false) { 23 | // multilanguage update needed 24 | 25 | $this->removeConfig($key); 26 | if (strpos($key, 'cookiedingsbums_') === 0) { 27 | $key = str_replace('cookiedingsbums_', '', $key); 28 | } 29 | $this->setConfig($prefix.$key, $value); 30 | } 31 | if ($key == $prefix.'custom_options' && $value != '') { 32 | if (substr($value, 0, 1) === '{') { 33 | $value = substr($value, 1); 34 | } 35 | if (substr($value, strlen($value) - 1, 1) === '}') { 36 | $value = substr($value, 0, strlen($value) - 1); 37 | } 38 | $this->setConfig($key, $value); 39 | } 40 | if ($key == $prefix.'script_checkbox') { 41 | $this->setConfig($prefix.'embed_auto', $value); 42 | $this->setConfig($prefix.'embed_config', $value); 43 | $this->setConfig($prefix.'embed_js', $value); 44 | $this->setConfig($prefix.'embed_css', $value); 45 | $this->removeConfig($prefix.'script_checkbox'); 46 | } 47 | } 48 | if (!$this->hasConfig($prefix.'status')) { 49 | $this->setConfig($prefix.'status', '1'); 50 | } 51 | -------------------------------------------------------------------------------- /pages/global_configuration.php: -------------------------------------------------------------------------------- 1 | getParam('save')) { 11 | $this->setConfig(rex_post('config', [ 12 | ['global_testmode', 'string', '0'], 13 | ['global_hide_on_cookie', 'string', '0'], 14 | ])); 15 | } 16 | $formElements = []; 17 | 18 | // Testmode 19 | $formElements[] = [ 20 | 'label' => '', 21 | 'field' => '', 22 | 'note' => $this->i18n('testmode_notice'), 23 | ]; 24 | 25 | // Hide JS and CSS if Cookie is set 26 | $formElements[] = [ 27 | 'label' => '', 28 | 'field' => '', 29 | 'note' => $this->i18n('hide_on_cookie_notice'), 30 | ]; 31 | 32 | $fragment = new rex_fragment(); 33 | $fragment->setVar('elements', $formElements, false); 34 | $content = $fragment->parse('core/form/checkbox.php'); 35 | 36 | // Save-Button 37 | $formElements = []; 38 | $n = []; 39 | $n['field'] = ''; 40 | $formElements[] = $n; 41 | 42 | $fragment = new rex_fragment(); 43 | $fragment->setVar('elements', $formElements, false); 44 | $buttons = $fragment->parse('core/form/submit.php'); 45 | 46 | $fragment = new rex_fragment(); 47 | $fragment->setVar('class', 'edit'); 48 | $fragment->setVar('body', $content, false); 49 | $fragment->setVar('title', $this->i18n('global_configuration')); 50 | $fragment->setVar('buttons', $buttons, false); 51 | ?> 52 |
-------------------------------------------------------------------------------- /assets/css/cookie_consent_insites_clean.css: -------------------------------------------------------------------------------- 1 | .cc-window{opacity:1;transition:opacity 1s ease}.cc-window.cc-invisible{opacity:0}.cc-animate.cc-revoke{transition:transform 1s ease}.cc-animate.cc-revoke.cc-top{transform:translateY(-2em)}.cc-animate.cc-revoke.cc-bottom{transform:translateY(2em)}.cc-animate.cc-revoke.cc-active.cc-bottom,.cc-animate.cc-revoke.cc-active.cc-top,.cc-revoke:hover{transform:translateY(0)}.cc-grower{max-height:0;overflow:hidden;transition:max-height 1s} 2 | .cc-revoke,.cc-window{position:fixed;overflow:hidden;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;z-index:9999}.cc-window.cc-static{position:static}.cc-window.cc-floating{padding:2em;max-width:24em;-ms-flex-direction:column;flex-direction:column}.cc-window.cc-banner{padding:1em 1.8em;width:100%;-ms-flex-direction:row;flex-direction:row}.cc-revoke{padding:.5em}.cc-btn,.cc-close,.cc-link,.cc-revoke{cursor:pointer}.cc-link{opacity:.8;display:inline-block;padding:.2em}.cc-link:hover{opacity:1}.cc-btn{display:block;padding:.4em .8em;border-width:2px;border-style:solid;text-align:center;white-space:nowrap}.cc-banner .cc-btn:last-child{min-width:140px}.cc-close{display:block;position:absolute;top:.5em;right:.5em;font-size:1.6em;opacity:.9}.cc-close:focus,.cc-close:hover{opacity:1} 3 | .cc-revoke.cc-top{top:0;left:3em;border-bottom-left-radius:.5em;border-bottom-right-radius:.5em}.cc-revoke.cc-bottom{bottom:0;left:3em;border-top-left-radius:.5em;border-top-right-radius:.5em}.cc-revoke.cc-left{left:3em;right:unset}.cc-revoke.cc-right{right:3em;left:unset}.cc-top{top:1em}.cc-left{left:1em}.cc-right{right:1em}.cc-bottom{bottom:1em}.cc-floating>.cc-link{margin-bottom:1em}.cc-floating .cc-message{display:block;margin-bottom:1em}.cc-window.cc-floating .cc-compliance{-ms-flex:1;flex:1}.cc-window.cc-banner{-ms-flex-align:center;align-items:center}.cc-banner.cc-top{left:0;right:0;top:0}.cc-banner.cc-bottom{left:0;right:0;bottom:0}.cc-banner .cc-message{-ms-flex:1;flex:1}.cc-compliance{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:justify;align-content:space-between}.cc-compliance>.cc-btn{-ms-flex:1;flex:1}.cc-btn+.cc-btn{margin-left:.5em} 4 | @media print{.cc-revoke,.cc-window{display:none}}@media screen and (max-width:900px){.cc-btn{white-space:normal}}@media screen and (max-width:414px) and (orientation:portrait),screen and (max-width:736px) and (orientation:landscape){.cc-window.cc-top{top:0}.cc-window.cc-bottom{bottom:0}.cc-window.cc-banner,.cc-window.cc-left,.cc-window.cc-right{left:0;right:0}.cc-window.cc-banner{-ms-flex-direction:column;flex-direction:column}.cc-window.cc-banner .cc-compliance{-ms-flex:1;flex:1}.cc-window.cc-floating{max-width:none}.cc-window .cc-message{margin-bottom:1em}.cc-window.cc-banner{-ms-flex-align:unset;align-items:unset}} 5 | .cc-floating.cc-theme-classic{padding:1.2em;border-radius:5px}.cc-floating.cc-type-info.cc-theme-classic .cc-compliance{text-align:center;display:inline;-ms-flex:none;flex:none}.cc-theme-classic .cc-btn{border-radius:5px}.cc-theme-classic .cc-btn:last-child{min-width:140px}.cc-floating.cc-type-info.cc-theme-classic .cc-btn{display:inline-block} 6 | .cc-theme-edgeless.cc-window{padding:0}.cc-floating.cc-theme-edgeless .cc-message{margin:2em 2em 1.5em}.cc-banner.cc-theme-edgeless .cc-btn{margin:0;padding:.8em 1.8em;height:100%}.cc-banner.cc-theme-edgeless .cc-message{margin-left:1em}.cc-floating.cc-theme-edgeless .cc-btn+.cc-btn{margin-left:0} 7 | -------------------------------------------------------------------------------- /assets/css/cookie_consent_insites.css: -------------------------------------------------------------------------------- 1 | .cc-window{opacity:1;transition:opacity 1s ease}.cc-window.cc-invisible{opacity:0}.cc-animate.cc-revoke{transition:transform 1s ease}.cc-animate.cc-revoke.cc-top{transform:translateY(-2em)}.cc-animate.cc-revoke.cc-bottom{transform:translateY(2em)}.cc-animate.cc-revoke.cc-active.cc-bottom,.cc-animate.cc-revoke.cc-active.cc-top,.cc-revoke:hover{transform:translateY(0)}.cc-grower{max-height:0;overflow:hidden;transition:max-height 1s} 2 | .cc-link,.cc-revoke:hover{text-decoration:underline}.cc-revoke,.cc-window{position:fixed;overflow:hidden;box-sizing:border-box;font-family:Helvetica,Calibri,Arial,sans-serif;font-size:16px;line-height:1.5em;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;z-index:9999}.cc-window.cc-static{position:static}.cc-window.cc-floating{padding:2em;max-width:24em;-ms-flex-direction:column;flex-direction:column}.cc-window.cc-banner{padding:1em 1.8em;width:100%;-ms-flex-direction:row;flex-direction:row}.cc-revoke{padding:.5em}.cc-header{font-size:18px;font-weight:700}.cc-btn,.cc-close,.cc-link,.cc-revoke{cursor:pointer}.cc-link{opacity:.8;display:inline-block;padding:.2em}.cc-link:hover{opacity:1}.cc-link:active,.cc-link:visited{color:initial}.cc-btn{display:block;padding:.4em .8em;font-size:.9em;font-weight:700;border-width:2px;border-style:solid;text-align:center;white-space:nowrap}.cc-banner .cc-btn:last-child{min-width:140px}.cc-highlight .cc-btn:first-child{background-color:transparent;border-color:transparent}.cc-highlight .cc-btn:first-child:focus,.cc-highlight .cc-btn:first-child:hover{background-color:transparent;text-decoration:underline}.cc-close{display:block;position:absolute;top:.5em;right:.5em;font-size:1.6em;opacity:.9;line-height:.75}.cc-close:focus,.cc-close:hover{opacity:1} 3 | .cc-revoke.cc-top{top:0;left:3em;border-bottom-left-radius:.5em;border-bottom-right-radius:.5em}.cc-revoke.cc-bottom{bottom:0;left:3em;border-top-left-radius:.5em;border-top-right-radius:.5em}.cc-revoke.cc-left{left:3em;right:unset}.cc-revoke.cc-right{right:3em;left:unset}.cc-top{top:1em}.cc-left{left:1em}.cc-right{right:1em}.cc-bottom{bottom:1em}.cc-floating>.cc-link{margin-bottom:1em}.cc-floating .cc-message{display:block;margin-bottom:1em}.cc-window.cc-floating .cc-compliance{-ms-flex:1;flex:1}.cc-window.cc-banner{-ms-flex-align:center;align-items:center}.cc-banner.cc-top{left:0;right:0;top:0}.cc-banner.cc-bottom{left:0;right:0;bottom:0}.cc-banner .cc-message{-ms-flex:1;flex:1}.cc-compliance{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:justify;align-content:space-between}.cc-compliance>.cc-btn{-ms-flex:1;flex:1}.cc-btn+.cc-btn{margin-left:.5em} 4 | @media print{.cc-revoke,.cc-window{display:none}}@media screen and (max-width:900px){.cc-btn{white-space:normal}}@media screen and (max-width:414px) and (orientation:portrait),screen and (max-width:736px) and (orientation:landscape){.cc-window.cc-top{top:0}.cc-window.cc-bottom{bottom:0}.cc-window.cc-banner,.cc-window.cc-left,.cc-window.cc-right{left:0;right:0}.cc-window.cc-banner{-ms-flex-direction:column;flex-direction:column}.cc-window.cc-banner .cc-compliance{-ms-flex:1;flex:1}.cc-window.cc-floating{max-width:none}.cc-window .cc-message{margin-bottom:1em}.cc-window.cc-banner{-ms-flex-align:unset;align-items:unset}} 5 | .cc-floating.cc-theme-classic{padding:1.2em;border-radius:5px}.cc-floating.cc-type-info.cc-theme-classic .cc-compliance{text-align:center;display:inline;-ms-flex:none;flex:none}.cc-theme-classic .cc-btn{border-radius:5px}.cc-theme-classic .cc-btn:last-child{min-width:140px}.cc-floating.cc-type-info.cc-theme-classic .cc-btn{display:inline-block} 6 | .cc-theme-edgeless.cc-window{padding:0}.cc-floating.cc-theme-edgeless .cc-message{margin:2em 2em 1.5em}.cc-banner.cc-theme-edgeless .cc-btn{margin:0;padding:.8em 1.8em;height:100%}.cc-banner.cc-theme-edgeless .cc-message{margin-left:1em}.cc-floating.cc-theme-edgeless .cc-btn+.cc-btn{margin-left:0} 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ⚠️ Entwicklung eingestellt: Eine Alternative mit mehr Funktionen bietet das FOR-AddOn [Cookie-Gedöns (iwcc)](https://github.com/FriendsOfREDAXO/iwcc). 2 | 3 | # Cookie Consent 4 | 5 | Das AddOn stellt das "Cookie Consent"-Script von [Insites](https://cookieconsent.insites.com) zur Verfügung und generiert einen Code um die EU Cookie-Richtlinie zu erfüllen. 6 | 7 |  8 | 9 | ## Features 10 | 11 | - Individuelle Darstellung des Cookie-Hinweis Banner 12 | - Auswahl der Textfarbe und des Textinhaltes 13 | - Auswahl der Hintergrundfarbe 14 | - Setzen der Datenschutzerklärung (interner oder externer Link) 15 | - Position des Cookie-Hinweis Banner 16 | - Vorgefertigte Designs als Auswahl 17 | - Konfigurationstest der gesetzten Farben 18 | - Ausgabe-Code zum kopieren oder Funktion zum automatischen einfügen 19 | 20 | ## Rechtliches 21 | Verwendung auf eigene Gefahr. 22 | Vor Verwendung des AddOns sollte die aktuelle Rechtslage (gerade in Deutschland) recherchiert werden. Das AddOn liefert nur das Skript. Eine Gewähr auf Rechtssicherheit ist nicht geggeben und wird auch nicht geleistet. 23 | 24 | ## Installation 25 | 26 | 1. Über Installer laden oder ZIP-Datei im AddOn-Ordner entpacken, der Ordner muss „cookie_consent“ heißen. 27 | 2. AddOn installieren und aktivieren 28 | 29 | ## Verwendung 30 | ### Automatisches Einbinden 31 | Für ein automatisches Einbinden muss das Häkchen `CSS und JS automatisch einbinden` gesetzt werden. 32 | 33 | Dann wird automatisch vor dem ``-Tag im Frontend die nötigen CSS- und JS-Dateien sowie die Konfiguration für Cookie-Consent eingefügt. 34 | ### Manuelles Einbinden 35 | Alternativ kann das Einbinden manuell erfolgen. 36 | 37 | Hierfür ist es notwendig `echo cookie_consent::cookie_consent_output();` im Quelltext aufgerufen werden. An der gewählten Stelle werden alle notwendigen CSS und JS-Dateien sowie die Konfiguration für Cookie-Consent eingefügt. 38 | 39 | 40 | 41 | > Alternativ: Im Reiter 'Konfigurations Test' den ausgegeben Code kopieren und in einem ``-Block vor dem schließenden ``- oder `