Releases: DirkPersky/typo3-dp_cookieconsent
v10.4.2
v10.4.0
v10.3.0
- new designed revoke Button
-- with individual Layout - Use Basis Script from new NPM package
- Performance enhancemend
v10.2.0
Back on TYPO3 6
#22 add new event dp--cookie-init
#24 #26 Dynamic Checkboxes
With this feature you can add or modify the checkbox types by configuration.
All you have to do is setting your new checkbox in TS and add it to the partial template:
Configuration/TypoScript/setup.txt:
checkboxes {
statistics = {$plugin.tx_cookieconsent.settings.statistics}
marketing = {$plugin.tx_cookieconsent.settings.marketing}
thirdparty = {$plugin.tx_cookieconsent.settings.thirdparty}
}
Resources/Private/Partials/CookieSelection.html:
<label for="dp--cookie-thirdparty">
<f:form.checkbox id="dp--cookie-thirdparty" class="dp--check-box" checked="{settings.checkboxes.thirdparty}" value="" />
<f:translate key="dpThirdparty" extensionName="dp_cookieconsent" />
</label>
v10.0.0
Fluid Layouts
now you can modify the Message and checkboxes by fluid layout
Events
Event | Description | Options |
---|---|---|
dp--cookie-fire | fire after a consent script/iframe is loaded | event.detail.$el |
dp--cookie-accept | fire when the consent is accepted | |
dp--cookie-accept-init | fire accepted event on revisited | |
dp--cookie-deny | fire when the consend is denied | |
dp--cookie-revoke | fire when the consent is revoked |
document.addEventListener('dp--cookie-fire', function (e) {
console.log('dp--cookie-fire', e.detail.$el);
});
document.addEventListener('dp--cookie-accept', function (e) {
console.log('dp--cookie-accept', e);
});
document.addEventListener('dp--cookie-deny', function (e) {
console.log('dp--cookie-deny', e);
});
document.addEventListener('dp--cookie-revoke', function (e) {
console.log('dp--cookie-deny', e);
});
v9.9.0
v9.8.0
iframe overlay
if you want to add an overlay to accept Cookies outside from the cookie hint
you can enable this feature in the TYPO3-constants
plugin.tx_cookieconsent.settings.overlay.notice = true
you also can modify the text in this hint individuel per iframe
<iframe
data-cookieconsent="statistics"
data-src="https://www.youtube-nocookie.com/embed/XXXXXX?autoplay=1"
class="dp--iframe"
data-cookieconsent-notice="Cookie Notice"
data-cookieconsent-description="Loading this...."
data-cookieconsent-btn="allow cookies and load this ...."
>
</iframe>
build your own overlay
or accept/deny cookies outside of the cookie hin, you can use the followed example
<button
onclick="window.DPCookieConsent.forceAccept(this)"
data-cookieconsent="statistics"
>allow cookies and play video</button>
allow cookies
window.DPCookieConsent.forceAccept(this)
deny cookies
window.DPCookieConsent.forceDeny(this)
v9.7.1
v9.7.0
load iframe after accepting
If you want to load iFrame's (YouTube, GMap, ..) after the Cookie is accepted you can use this snipped
<iframe width="560" height="315"
data-cookieconsent="statistics"
data-src="https://www.youtube-nocookie.com/embed/XXXXXX?autoplay=1"
class="dp--iframe"
frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreenn >
</iframe>
With the class="dp--iframe"
the iFrame is hidden in default and would be shown after the cookie acceptioning.