Stay legal in the EU with this FREE cookie notice

If your website operates in the EU, you need to put a notice on your site informing people about the use of cookies.  To comply with this regulation you can use this script which I found at http://www.daretothink.co.uk/blog/eu-cookie-law-script/ to stay legal.

Edit templates/base/_header.html

Find </head>

Before add this code:


<style type="text/css">
<!--
#eucookielaw { display:none }
-->
</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<?php
if(!isset($_COOKIE['eucookie']))
{ ?>
<script type="text/javascript">
function SetCookie(c_name,value,expiredays)
{
var exdate=new Date()
exdate.setDate(exdate.getDate()+expiredays)
document.cookie=c_name+ "=" +escape(value)+";path=/"+((expiredays==null) ? "" : ";expires="+exdate.toGMTString())
}
</script>
<?php } ?>



NOW FIND <body <bx_injection:injection_body /> class="bx-def-font">

After this code enter:

 

 

<?php
if(!isset($_COOKIE['eucookie']))
{?>
<div id="eucookielaw">
<font size="3" ><p align="justify">We usecookies.By browsing our site you agree toour useof cookies.</p>
<center><aid="removecookie">Accept thesecookies</a>
<a href="/privacy.php"><b>Find out more</b></a></font></center>
</div>
<script type="text/javascript">
if(document.cookie.indexOf("eucookie")===-1){
$("#eucookielaw").show();
}
$("#removecookie").click(function(){
SetCookie('eucookie','eucookie',365*10)
$("#eucookielaw").remove();
});
</script>
<?php}?>

Where you see We usecookies.By browsing our site you agree toour useof cookies. you can enter your own message.

NOW CLEAR THE CACHE

Once the user clicks 'Accept these cookies', this will create a cookie called eucookie and the message will disappear.

if you prefer the user to open a new window when reading the privacy information change <a href="/privacy.php"> to <a href="/privacy.php" target="_blank">

THAT'S IT!!!
Quote · 28 Aug 2015

Sorry all,

 

I made an slight error.  Please remove <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> as it clashed with other jquery features.

The code above </head> should be:

 

 

<style type="text/css">
<!--
#eucookielaw { display:none }
-->
</style>
<?php
if(!isset($_COOKIE['eucookie']))
{ ?>
<script type="text/javascript">
function SetCookie(c_name,value,expiredays)
{
var exdate=new Date()
exdate.setDate(exdate.getDate()+expiredays)
document.cookie=c_name+ "=" +escape(value)+";path=/"+((expiredays==null) ? "" : ";expires="+exdate.toGMTString())
}
</script>
<?php } ?>


Thanks

Quote · 28 Aug 2015

Thanks !

Quote · 29 Jul 2016

thanks and added one. I am not sure how to check but if anyone in EU and can check site for me, then please do and update

www.godesi.com

Quote · 14 Aug 2016

 

thanks and added one. I am not sure how to check but if anyone in EU and can check site for me, then please do and update

www.godesi.com

 

It does not matter where you live or get on your site. I just viewed your site and it does not show. I use: https://www.boonex.com/m/cookie-notifications

Quote · 14 Aug 2016
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.