Jump to content

Cookies Notification Bar


Recommended Posts

Hi

I am wondering if anyone was able to install a cookies notification bar at the bottom (for example) to inform that users are supposed to accept our cookies policy.

Apart from one commercial module that I found, is there any way to do this for free?

Thank you.

Link to comment
Share on other sites

53 minutes ago, brian! said:

i'm tempted to tell you to have a word with @cluster as he just posted about it!

if you search google for gdpr jQuery (or php), there will be plenty of free options, e.g Cookie Consent - that will generate the code for you to paste into the header of your site... i'd be tempted to add that code as a header hook and it should work fine.

For a non-programmer, this is all Chinese to me. No idea where to start... but thank you for pointing out.

9 minutes ago, wsa said:

you can search at https://marketplace.whmcs.com

Hmmm... I mentioned  that after searching the marketplace "Apart from one commercial module that I found, is there any way to do this for free?" but well done, good way to advertise your commercial product here :)

Edited by sitesme
Link to comment
Share on other sites

57 minutes ago, brian! said:

if you search google for gdpr jQuery (or php), there will be plenty of free options, e.g Cookie Consent - that will generate the code for you to paste into the header of your site... i'd be tempted to add that code as a header hook and it should work fine.

Oh!!! I missed this link! This site is perfect: https://cookieconsent.insites.com/download/# and we can easily customise the look of the bar. Amazing! Thank you @brian!

Now... any guidance on how to create this header hook?

Link to comment
Share on other sites

10 minutes ago, sitesme said:

Now... any guidance on how to create this header hook?

after you've gone through the wizard to generate the code, you should just be able to paste it into the hook below between return <<<HTML and HTML; at the end... just replace that demo code that is already there in the hook...

<?php

/**
* Cookie Bar
* @author brian!
*/

add_hook('ClientAreaHeadOutput', 1, function($vars) {
    
	return <<<HTML
    
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function(){
window.cookieconsent.initialise({
  "palette": {
    "popup": {
      "background": "#eaf7f7",
      "text": "#5c7291"
    },
    "button": {
      "background": "#56cbdb",
      "text": "#ffffff"
    }
  },
  "theme": "edgeless"
})});
</script>

HTML;
});

yrsGoPq.png

Link to comment
Share on other sites

Hi ,

the code from Brian is cool as always but if you need to provide more information regarding DSGVO / GDPR you should use tho script from Cookiebot.

 

Unfortunately, due to the community rule, no link, but Google search place one under cookiebot

It is multilingual , shows the use of cookies, pre Opt-in in case of Google Analytics ( yellow marker ).

It is free less than 100 sub pages and 1 Domain.

image.png.5e7ad8b1a819ffc20372afe4dc767477.png

You just fill out what you need, choose your design, copy the script and past it in your header.tpl that easy.

Copy the code go to --> ../Template/your_template/header.tpl open in your favorite editor and paste the script 
immediately after the <head> Tag.

image.thumb.png.947a91c52ebff2a0b9bfa4133df1091b.png

That easy .

Here some pictures

image.thumb.png.a0c8519170b4757e29b6e7e11417b3c1.png

image.png.53f72576c2c821dbfa9b9ea7c9f8077e.png

Greetings Christian

Link to comment
Share on other sites

6 minutes ago, wp4all said:

Unfortunately, due to the community rule, no link, but Google search place one under cookiebot

I don't think linking to it would be an issue unless it was either your product and/or you used a referral link. :?:

7 minutes ago, wp4all said:

Copy the code go to --> ../Template/your_template/header.tpl open in your favorite editor and paste the script 
immediately after the <head> Tag.

even easier, use my hook above... paste that code into the middle of it.... no more need to update the template after a WHMCS upgrade! :idea:

Link to comment
Share on other sites

I guess once we start exploring for alternatives, there are endless options out there.

I found this solution from OneTrust and it seems very easy to configure and to add the code through a hook as @brian! mentioned. Other solutions that I found useful are Cookie Script, or Cookie Control (Civic). All of them with cookie management control allowing each user to enable/disable the cookies they want.

For a simple cookies bar message (without any control whatsoever) the Cookie Consent is just perfect with a good amount of options to customise the look and position of the warning message.

Best of all... they are all free or they have a free option.

Link to comment
Share on other sites

Hi sitesme,

 

I have nothing to add, my post is not only posted to your inquiry.

I try every time to spread my information to all possible readers and special the part DSGVO / GDPR wich is mostly necessary in the EU.
This was my only attention not to force somebody to use cookiebot B|.

So I'm happy that you are happy :1310_thumbsup_tone1:that is the most important part .

Greetings Christian

Link to comment
Share on other sites

Hi @wp4all

My comment was not to be taken as offensive. I just added more info to complement your contribution with more alternatives, that's all!

Since I was the one who started this thread, I am using it to share multiple alternatives to other users and also as a bookmark to myself, whenever I need to access to this information again in the future. You are indeed who contributed for me to look into other alternatives and I thank you for this :)

All the best.

Link to comment
Share on other sites

2 hours ago, sitesme said:

I guess once we start exploring for alternatives, there are endless options out there.

yeah - the free cookie/privacy scripts have been around for years, so they're now being adapted to cover the GDPR issues too... the trick is how to integrate them into WHMCS, and that's usually just a quick addition to the header or footer.

21 minutes ago, sitesme said:

My comment was not to be taken as offensive. I just added more info to complement your contribution with more alternatives, that's all!

that's how I read it too. :idea:

26 minutes ago, sitesme said:

Since I was the one who started this thread, I am using it to share multiple alternatives to other users and also as a bookmark to myself, whenever I need to access to this information again in the future.

that's one good way to make this place a real community - users should be helping each other wherever possible...

if this place just becomes somewhere where only WHMCS staff answer support questions, then it's the Support Department Lite and we can expect replies from them to be days later... and possibly vague! :P

 

Link to comment
Share on other sites

  • 3 years later...
On 6/3/2018 at 6:41 PM, brian! said:

after you've gone through the wizard to generate the code, you should just be able to paste it into the hook below between return <<<HTML and HTML; at the end... just replace that demo code that is already there in the hook...


<?php

/**
* Cookie Bar
* @author brian!
*/

add_hook('ClientAreaHeadOutput', 1, function($vars) {
    
	return <<<HTML
    
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function(){
window.cookieconsent.initialise({
  "palette": {
    "popup": {
      "background": "#eaf7f7",
      "text": "#5c7291"
    },
    "button": {
      "background": "#56cbdb",
      "text": "#ffffff"
    }
  },
  "theme": "edgeless"
})});
</script>

HTML;
});

yrsGoPq.png

where do we add this code?

Link to comment
Share on other sites

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated