Jump to content
Latest News: (loading..)
JcMagpie

Support thread for GDPR Cookie Widgets V1.0 v2.3.4.1 CE

Recommended Posts

Posted (edited)

Simple addon any issues post here.

4 cookie widgets tab by JcMagpie 24-5-2018 V1.0 GDPR Cookie Widgets V1.0 v2.3.4.1 CE

 

4 individual addon’s that can add a cookie widget to your site. These are all set for EU GDPR requirements so customer can refuse cookies. If you don't want this then don't use these. You can chose 4 positions.

 

Top -Headder

Bottom -Footer

Left side

Right side

 

Only have one active at anyone time. Again totally standalone with no core code change. Once you have copied all the files over go into admin/Content /Modules and install the one you require

 

It uses the stock privacy.php to display statement. You can change the words displayed and change what is shown on links and buttons. The link to ocS privacy has to be edited in the templates of each addon. The colors can also be changes in the same file.

 

To add new text for each link simply edit one file in each addon .

 

/includes/modules/content/footer/templates/tpl_cm_footer_jcmcookief_links.php

 

/includes/modules/navbar_modules/templates/jcmnavcookie.php

 

/includes/modules/boxes/templates/jcmcookieleft.php

 

/includes/modules/boxes/templates/jcmcookieleft.php

 

Simply find the following and replace the stock text between each marking.

Only change the text marked ****************

 

 


"content": {
"message": "This website uses cookies to ensure you have the best experience on our website.",
"dismiss": "Got it!",
"deny": "Refuse Cookies",
"link": "Learn More",
"href": "https://www.tbyb.co.uk/privacy.php"

 

Don't forget to put in your own website!

This shows what it looks like, you can see the Nav bar working at the test site https://www.tbyb.co.uk/

image.png.d80ab5558a45638e3788b033e17c1b8a.png

Left and Right widgets.

image.png.10d5b36d9ecec3d882b4af18e5223586.png

 

Edited by JcMagpie
add image

 

Share this post


Link to post
Share on other sites
1 hour ago, JcMagpie said:

To add new text for each link simply edit one file in each addon .

...

Thanks for creating free modules :)

Shouldn't the text be pasted into some files in the language folders? This way the text is always in the same language no matter which language the customer selects/understands??

I think the same is true for your GDRP and info link addons!?

Share this post


Link to post
Share on other sites

just had a look, and it does not disable any cookies (Google Analytics) when i click on refuse cookies, looking at the documentation of the cookie script you, have to add  some extra code to disable any cookies.

Share this post


Link to post
Share on other sites
Posted (edited)

I'm not sure about that cookie. But you can edit code to sute your need. This allows you to ads the widget with out changing core code. What you need to add will depend on what cookies you are using will be difernt for everyone.

Disabling cookies should be done with the callback hook, typical code would be.

You can replace or edit the code the widget runs as required.

https://cookieconsent.insites.com/documentation/javascript-api/#hooks

onInitialise: function (status) {
  var type = this.options.type;
  var didConsent = this.hasConsented();
  if (type == 'opt-in' && didConsent) {
    // enable cookies
  }
  if (type == 'opt-out' && !didConsent) {
    // disable cookies
  }
},
 
onStatusChange: function(status, chosenBefore) {
  var type = this.options.type;
  var didConsent = this.hasConsented();
  if (type == 'opt-in' && didConsent) {
    // enable cookies
  }
  if (type == 'opt-out' && !didConsent) {
    // disable cookies
  }
},
 
onRevokeChoice: function() {
  var type = this.options.type;
  if (type == 'opt-in') {
    // disable cookies
  }
  if (type == 'opt-out') {
    // enable cookies
  }
},

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites
Posted (edited)

I understand some may not be able to edit code as needed to block cookies.

As a simple alternative you can use is a hosted solution, its free. Just go to the  website below and follow instruction. Then copy the script

generated and place it in the relevant file such as

/includes/modules/navbar_modules/templates/jcmnavcookie.php

This is a sample script.

 "text/javascript" "https://cdn.jsdelivr.net/npm/cookie-bar/cookiebar-latest.min.js?theme=grey&tracking=1&thirdparty=1&always=1&noGeoIp=1&scrolling=1&refreshPage=1&showNoConsent=1&hideDetailsBtn=1&blocking=1&privacyPage=https%3A%2F%2Fwww.tbyb.co.uk%2Fprivacy.php"

Its for my test site so don’t use it other than to test. Go get your own from the site below.

https://cookie-bar.eu/#installation

Edited by JcMagpie
update

 

Share this post


Link to post
Share on other sites

This script should work as long as you have /privicy.php on your site.

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/cookie-bar/cookiebar-latest.min.js?theme=grey&tracking=1&thirdparty=1&always=1&scrolling=1&refreshPage=1&showNoConsent=1&blocking=1&privacyPage=%2Fprivacy.php"></script>

I have tested several scripts now and they all work to some degree or other. None have proven to block everything all the time.

If in so inclined the only way to make sure is to aske customer to turn of cookies in the browser. Even this can be complicated if they have no idea how to do it. However you can at least display the message “Turn off cookies in you browser”

 


 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×