Neues Modul Cookie-Hinweis auf Grundlage von Cookie Consent

Alles rund um Module und Plugins in CONTENIDO 4.9.
Antworten
Freddy
Beiträge: 252
Registriert: Fr 6. Mai 2005, 21:01
Wohnort: Gummersbach
Kontaktdaten:

Neues Modul Cookie-Hinweis auf Grundlage von Cookie Consent

Beitrag von Freddy » Di 26. Jun 2018, 17:31

Habe ein neues Modul erstellt. Habe im Web unter https://cookieconsent.insites.com ein Open Source Projekt gefunden welches ich zum Contenido-Modul angepasst habe.

Installationanleitung:
  • Fügen Sie das Modul in der Kopfzeile Ihrer Website kurz vor dem </ head> hinzu.
  • Legen Sie unter den Mandanteneinstellungen einen Link zur Datenschutzerklärung fest. Typ: dse_page // Name: idart // Wert: (Idart zur ihrer Datenschutzerklärung).
  • Passen Sie gegebenenfalls die Werte unter manual settings im Output-Code an.
    Dort können Sie aus fünf verschiedenen Positionen auswählen: Banner bottom, Banner top, Banner top (pushdown), Floating left und Floating right.
Hier das Modul zum Download:
script_cookieconsent.zip
(8.15 KiB) 248-mal heruntergeladen

Name: script_cookieconsent

Modul-Beschreibung:

Code: Alles auswählen

CONTENIDO MODUL

Modulname   :     script_cookieconsent 
Author(s)   :     Freddy
Created     :     2018.06.26
Version     :     Currently v 3.0.3 from https://cookieconsent.insites.com

## Installation
- Add the stylesheet cookieconsent.min.css under CSS and cookieconsent.min.js under JavaScript. You can find it at https://github.com/insites/cookieconsent/tree/master/build
- Add the modul in the header of your website, just before the </head>
- Under the client settings, set a link to the privacy policy. Typ: dse_page // Name: idart // Wert: ...
- If necessary, adjust the values under manual settings in the output.


## What is Cookie Consent?
Cookie Consent is a lightweight JavaScript plugin for alerting users about the use of cookies on your website.
It is designed to help you comply with the hideous EU Cookie Law and not make you want to kill yourself in the process. So we made it fast, free, and relatively painless.

## Documentation
See our full documentation: https://cookieconsent.insites.com/documentation/about-cookie-consent/

## License
Code released under the MIT licence.

## Credits
Cookie Consent v3
+ Alex Morley-Finch - JavaScript
+ Piiu Pilt - JavaScript
+ Oliver Emberton (@oliveremberton) - a couple of lines of CSS, maybe
Cookie Consent v2
+ David Ball (@drball) - CSS / themes
+ Adam Hutchinson (@adjohu) - JavaScript
Modul-Ausgabe:

Code: Alles auswählen

<?php
// assert framework initialization
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');

// get client settings
$dse_page = getEffectiveSetting('dse_page', 'idart', '');

// manual settings
$palette_background = "#edeff5";
$palette_text = "#838391";
$button_background = "transparent";
$button_text = "#4b81e8";
$button_border = "#4b81e8";
$position = "banner_top_pushdown"; // banner_bottom / banner_top / banner_top_pushdown / floating_left / floating_right


// use smarty template to output header text
$tpl = cSmartyFrontend::getInstance();
$tpl->assign('trans', array(
            'message' => mi18n("MESSAGE"),
            'link' => mi18n("LINK"),
            'dismiss' => mi18n("DISMISS"),
	        'allow' => mi18n("ALLOW"),
	        'deny' => mi18n("DENY"),
        ));
$tpl->assign('linkhref', $dse_page);
$tpl->assign('palbg', $palette_background);
$tpl->assign('paltext', $palette_text);
$tpl->assign('butbg', $button_background);
$tpl->assign('buttext', $button_text);
$tpl->assign('butborder', $button_border);
$tpl->assign('position', $position);

$tpl->display('get.tpl');
?>
Modul-Übersetzung:

Code: Alles auswählen

ALLOW=Cookies zulassen
DENY=Ablehnen
DISMISS=Akzeptieren
LINK=Mehr erfahren
MESSAGE=Diese Website verwendet Cookies. Durch die Nutzung dieser Webseite erklären Sie sich damit einverstanden, dass Cookies gesetzt werden.
Modul-HTML-Template:

Code: Alles auswählen

<link rel="stylesheet" type="text/css" href="css/cookieconsent.min.css" />
<script src="js/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function(){
window.cookieconsent.initialise({
  "palette": {
    "popup": {
      "background": "{$palbg|escape}",
      "text": "{$paltext}"
    },
    "button": {
      "background": "{$butbg|escape}",
      "text": "{$buttext|escape}",
      "border": "{$butborder|escape}"
    }
  },{if $position==banner_top_pushdown or $position==banner_top or $position==floating_left or $position==floating_right}
								
  "position": "{/if}
{if $position==banner_top_pushdown}top{/if}
{if $position==banner_top}top{/if}
{if $position==floating_left}bottom-left{/if}
{if $position==floating_right}bottom-right{/if}
{if $position==banner_top_pushdown or $position==banner_top or $position==floating_left or $position==floating_right}",{/if}
{if $position==banner_top_pushdown}
								
  "static": true,{/if}								
  "content": {
    "message": "{$trans.message|escape}",
    "dismiss": "{$trans.dismiss|escape}",
    "link": "{$trans.link|escape}",
	"href": "front_content.php?idart={$linkhref|escape}"
  }
})});
</script>

WarnerHet
Beiträge: 1
Registriert: Mi 19. Dez 2018, 14:16

Neues Modul Cookie Hinweis auf Grundlage von Cookie Consent

Beitrag von WarnerHet » So 30. Dez 2018, 04:33

Hallo zusammen,

ist es mцglich ein und das selbe Modul Google Adsense auf mehreren Positionen darzustellen?

LG Basti

Antworten