Como colocar aviso de uso de cookies en el blog
<script src="http://j.maxmind.com/app/geoip.js"></script>
<div id="barritaloca" style="display:none;position:fixed;left:0px;right:0px;bottom:0px;width:100%;min-height:40px;background: #333333;color:#dddddd;z-index: 99999;">
<div style="width:100%;position:absolute;padding-left:5px;font-family:verdana;font-size:12px;top:30%;">
Usamos cookies propias y de terceros para mostrar publicidad personalizada según su navegación. Si continua navegando consideramos que acepta el uso de cookies.
<a href="javascript:void(0);" style="padding:4px;background:#4682B4;text-decoration:none;color:#fff;" onclick="PonerCookie();"><b>OK</b></a>
<a href="http://www.google.com.ar/intl/es-419/policies/technologies/types/" target="_blank" style="padding-left:5px;text-decoration:none;color:#ffffff;">Más información</a>
</div>
</div>
<script>
function getCookie(c_name){
var c_value = document.cookie;
var c_start = c_value.indexOf(" " + c_name + "=");
if (c_start == -1){
c_start = c_value.indexOf(c_name + "=");
}
if (c_start == -1){
c_value = null;
}else{
c_start = c_value.indexOf("=", c_start) + 1;
var c_end = c_value.indexOf(";", c_start);
if (c_end == -1){
c_end = c_value.length;
}
c_value = unescape(c_value.substring(c_start,c_end));
}
return c_value;
}
function setCookie(c_name,value,exdays){
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value;
}
if(geoip_country_code()=="ES" && getCookie('aviso')!="1"){
document.getElementById("barritaloca").style.display="block";
}
function PonerCookie(){
setCookie('aviso','1',365);
document.getElementById("barritaloca").style.display="none";
}
</script>
<div id="barritaloca" style="display:none;position:fixed;left:0px;right:0px;bottom:0px;width:100%;min-height:40px;background: #333333;color:#dddddd;z-index: 99999;"><div style="width:100%;position:absolute;padding-left:5px;font-family:verdana;font-size:12px;top:30%;"> Usamos cookies propias y de terceros para mostrar publicidad personalizada según su navegación. Si continua navegando consideramos que acepta el uso de cookies. <a href="javascript:void(0);" style="padding:4px;background:#4682B4;text-decoration:none;color:#fff;" onclick="PonerCookie();"><b>OK</b></a> <a href="http://www.google.com.ar/intl/es-419/policies/technologies/types/" target="_blank" style="padding-left:5px;text-decoration:none;color:#ffffff;">Más información</a></div></div><script>function getCookie(c_name){ var c_value = document.cookie; var c_start = c_value.indexOf(" " + c_name + "="); if (c_start == -1){ c_start = c_value.indexOf(c_name + "="); } if (c_start == -1){ c_value = null; }else{ c_start = c_value.indexOf("=", c_start) + 1; var c_end = c_value.indexOf(";", c_start); if (c_end == -1){ c_end = c_value.length; } c_value = unescape(c_value.substring(c_start,c_end)); } return c_value;}function setCookie(c_name,value,exdays){ var exdate=new Date(); exdate.setDate(exdate.getDate() + exdays); var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString()); document.cookie=c_name + "=" + c_value;}if(getCookie('aviso')!="1"){ document.getElementById("barritaloca").style.display="block";}function PonerCookie(){ setCookie('aviso','1',365); document.getElementById("barritaloca").style.display="none";}</script>
La barra se coloca abajo pero si quieres que aparezca arriba, busca en el codigo:
style="display:none;position:fixed;left:0px;right:0px;bottom:0px;width:100%;min-height:40px;background: #333333;color:#dddddd;z-index: 99999;">
en vez de bottom pon top y aparecera arriba.
Mi código y mis colores:
<script src="http://j.maxmind.com/app/geoip.js"></script><div id="barritaloca" style="display:none;position:fixed;right:0px;top:0px;width:100%;min-height:40px;background: #bbf2ce;color:#0d430f;z-index: 99999;"><div style="width:100%;position:absolute;padding-left:200px;font-family:verdana;font-size:12px;top:30%;">Usamos cookies propias y de terceros para mostrar publicidad personalizada según su navegación. Si continua navegando consideramos que acepta el uso de cookies.<a href="javascript:void(0);" style="padding:4px;background:#2dcf94;text-decoration:none;color:#fff;" onclick="PonerCookie();"><b>OK</b></a><a href="http://www.google.com.ar/intl/es-419/policies/technologies/types/" target="_blank" style="padding-left:5px;text-decoration:none;color:#0d430f;">Más información</a></div></div><script>function getCookie(c_name){var c_value = document.cookie;var c_start = c_value.indexOf(" " + c_name + "=");if (c_start == -1){c_start = c_value.indexOf(c_name + "=");}if (c_start == -1){c_value = null;}else{c_start = c_value.indexOf("=", c_start) + 1;var c_end = c_value.indexOf(";", c_start);if (c_end == -1){c_end = c_value.length;}c_value = unescape(c_value.substring(c_start,c_end));}return c_value;}function setCookie(c_name,value,exdays){var exdate=new Date();exdate.setDate(exdate.getDate() + exdays);var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());document.cookie=c_name + "=" + c_value;}if(geoip_country_code()=="ES" && getCookie('aviso')!="1"){document.getElementById("barritaloca").style.display="block";}function PonerCookie(){setCookie('aviso','1',365);document.getElementById("barritaloca").style.display="none";}</script>