Navigation Menu

Skip to content

Commit

Permalink
Version 2.5.0 released
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolamonica committed Aug 18, 2015
1 parent bc1f15b commit 87041b4
Show file tree
Hide file tree
Showing 37 changed files with 44 additions and 20 deletions.
5 changes: 3 additions & 2 deletions EUCookieLaw-admin.js 100644 → 100755
@@ -1,7 +1,7 @@
/**
* EUCookieLaw: simple object to accomplish european law requirements about cookie transmission to clients
* @class EUCookieLaw
* @version 2.4.0
* @version 2.5.0
* @link https://github.com/diegolamonica/EUCookieLaw/
* @author Diego La Monica (diegolamonica) <diego.lamonica@gmail.com>
* @copyright 2015 Diego La Monica
Expand Down Expand Up @@ -102,7 +102,8 @@
'.add', /* The add action selector */
'.remove', /* The remove action selector */
function(action) {
console.log(action, $('input[name="blocked_domains[]"]:first').blur() );
console.log(action);
$('input[name="blocked_domains[]"]:first').blur();
}
);

Expand Down
Empty file modified EUCookieLaw-tinymce.js 100644 → 100755
Empty file.
7 changes: 4 additions & 3 deletions EUCookieLaw.js 100644 → 100755
@@ -1,7 +1,7 @@
/**
* EUCookieLaw: simple object to accomplish european law requirements about cookie transmission to clients
* @class EUCookieLaw
* @version 2.4.0
* @version 2.5.0
* @link https://github.com/diegolamonica/EUCookieLaw/
* @author Diego La Monica (diegolamonica) <diego.lamonica@gmail.com>
* @copyright 2015 Diego La Monica
Expand Down Expand Up @@ -116,6 +116,7 @@ var EUCookieLaw = (function (doc) {
minScroll: 100,
remember: false,
path: '/',
domain: window.location.host,
cookieList: [],
blacklist: [],
showAgreement: function () {
Expand Down Expand Up @@ -210,7 +211,7 @@ var EUCookieLaw = (function (doc) {
var writeInternalCookie = function( value, expires ){
expires = (expires === undefined) ? '' : (';expires=' + expires);
doc.cookie = "__eucookielaw=" + value
+ ";domain=" + window.location.host
+ (settings.domain?(";domain=" + settings.domain):'')
+ ";path=" + settings.path
+ expires;
}
Expand Down Expand Up @@ -248,7 +249,7 @@ var EUCookieLaw = (function (doc) {
}
}

if(settings.reload) window.location.reload();
if(settings.reload) window.location.reload(true);

};
this.reject = function () {
Expand Down
Empty file modified EUCookieLawCustom/EUCookieLawCustom-it_IT.mo 100644 → 100755
Empty file.
Empty file modified EUCookieLawCustom/EUCookieLawCustom-it_IT.po 100644 → 100755
Empty file.
Empty file modified EUCookieLawCustom/blocked/default.html 100644 → 100755
Empty file.
Empty file modified EUCookieLawCustom/blocked/default.js 100644 → 100755
Empty file.
Empty file modified EUCookieLawCustom/blocked/empty.js 100644 → 100755
Empty file.
Empty file modified EUCookieLawCustom/default.po 100644 → 100755
Empty file.
Empty file modified EUCookieLawCustom/eucookielaw.css 100644 → 100755
Empty file.
Empty file modified LICENSE 100644 → 100755
Empty file.
Empty file modified blocked/default.html 100644 → 100755
Empty file.
Empty file modified blocked/default.js 100644 → 100755
Empty file.
Empty file modified blocked/empty.js 100644 → 100755
Empty file.
Empty file modified cookie.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified editor.php 100644 → 100755
Empty file.
6 changes: 3 additions & 3 deletions eucookielaw-cache.php 100644 → 100755
@@ -1,7 +1,7 @@
<?php
/**
* EUCookieLaw: EUCookieLaw a complete solution to accomplish european law requirements about cookie consent
* @version 2.4.0
* @version 2.5.0
* @link https://github.com/diegolamonica/EUCookieLaw/
* @author Diego La Monica (diegolamonica) <diego.lamonica@gmail.com>
* @copyright 2015 Diego La Monica <http://diegolamonica.info>
Expand All @@ -17,7 +17,7 @@

global $euc_iniFile;

if ( ! defined( 'EUCL_CONTENT_DIR' ) ) define('WP_CONTENT_DIR', ABSPATH . '/wp-content');
if ( ! defined( 'EUCL_CONTENT_DIR' ) ) define('EUCL_CONTENT_DIR', ABSPATH . '/wp-content');

if ( is_dir( EUCL_CONTENT_DIR . '/plugins/nextgen-gallery' ) &&
( strpos( strtolower( $_SERVER['REQUEST_URI'] ), 'nextgen-attach_to_post' ) !== false )
Expand Down Expand Up @@ -104,7 +104,7 @@ function EUCgetOption( $key, $defaultValue = false ) {
! defined( 'EUCOOKIELAW_BANNER_AGREE_LINK' ) && define( 'EUCOOKIELAW_BANNER_AGREE_LINK', $agreeLink );
! defined( 'EUCOOKIELAW_BANNER_DISAGREE_LINK' ) && define( 'EUCOOKIELAW_BANNER_DISAGREE_LINK', $disagreeLink );

! defined( 'EUCOOKIELAW_DEBUG' ) && define( 'EUCOOKIELAW_DEBUG', ( $debug == 'y' ) );
! defined( 'EUCOOKIELAW_DEBUG' ) && define( 'EUCOOKIELAW_DEBUG', ( $debug !== 'n' ) );
! defined( 'EUCOOKIELAW_DISABLED' ) && define( 'EUCOOKIELAW_DISABLED', $enabled !== 'y' );
! defined( 'EUCOOKIELAW_ALLOWED_COOKIES' ) && define( 'EUCOOKIELAW_ALLOWED_COOKIES', $whitelstCookies );

Expand Down
12 changes: 7 additions & 5 deletions eucookielaw-header.php 100644 → 100755
Expand Up @@ -298,7 +298,8 @@ private function hasDisallowedURL($url){
$domainToScan = preg_quote( $disallowedDomain, "#" );
}

if ( preg_match( '#\/\/' . $domainToScan . '#', $url ) ) {
$pregString ='#\/\/' . $domainToScan . '#';
if ( preg_match( $pregString, $url ) ) {

return true;
}
Expand All @@ -320,13 +321,14 @@ private function useDOM( $buffer, $tags, $specialAttriutes, $inScripts ){
$this->log( "Buffer size is: " . strlen($buffer));

foreach($tags as $tag) {
$attribute = isset($specialAttriutes[$tag]) ? $specialAttriutes[$tag] : $specialAttriutes['*'];

$elements = $doc->getElementsByTagName($tag);
$this->log("Found " . $elements->length . ' as ' . $tag);
$this->log("Found " . $elements->length . ' with query selector ' . $tag.'[' . $attribute . ']');
foreach($elements as $element){
$attribute = isset($specialAttriutes[$tag]) ? $specialAttriutes[$tag] : $specialAttriutes['*'];
$url = $element->getAttribute($attribute);
$this->log("Checking $url");
# $attribute = isset($specialAttriutes[$tag]) ? $specialAttriutes[$tag] : $specialAttriutes['*'];
$url = $element->hasAttribute($attribute) ? $element->getAttribute($attribute) : null;
if(!is_null($url) ) $this->log("Checking $url");
if(!empty($url) && $this->hasDisallowedURL($url)){
$this->log(">>> Found $url <<<");
$newURL = $this->getDefaultSourceByType($tag);
Expand Down
Empty file modified eucookielaw-tinymce.css 100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions eucookielaw-wp.php 100644 → 100755
@@ -1,7 +1,7 @@
<?php
/**
* EUCookieLaw: EUCookieLaw a complete solution to accomplish european law requirements about cookie consent
* @version 2.4.0
* @version 2.5.0
* @link https://github.com/diegolamonica/EUCookieLaw/
* @author Diego La Monica (diegolamonica) <diego.lamonica@gmail.com>
* @copyright 2015 Diego La Monica <http://diegolamonica.info>
Expand All @@ -18,7 +18,7 @@
const TEXTDOMAIN = 'EUCookieLaw';
const CUSTOMDOMAIN = 'EUCookieLawCustom';
const MENU_SLUG = 'EUCookieLaw';
const VERSION = '2.4.0';
const VERSION = '2.5.0';
const CSS = 'EUCookieLaw_css';
const CUSTOMCSS = 'EUCookieLaw_css_custom';
const JS = 'EUCookieLaw_js';
Expand Down
Empty file modified eucookielaw.css 100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions eucookielaw.php 100644 → 100755
Expand Up @@ -4,15 +4,15 @@
* Plugin URI: https://github.com/diegolamonica/EUCookieLaw
* Description: A simple WP solution to the European Cookie Law Issue
* Author: Diego La Monica
* Version: 2.4.0
* Version: 2.5.0
* Author URI: http://diegolamonica.info
* Text Domain: EUCookieLaw
* Domain Path: /languages
*/

/**
* EUCookieLaw: EUCookieLaw a complete solution to accomplish european law requirements about cookie consent
* @version 2.4.0
* @version 2.5.0
* @link https://github.com/diegolamonica/EUCookieLaw/
* @author Diego La Monica (diegolamonica) <diego.lamonica@gmail.com>
* @copyright 2015 Diego La Monica <http://diegolamonica.info>
Expand Down
Empty file modified gzcompat.php 100644 → 100755
Empty file.
Empty file modified index.html 100644 → 100755
Empty file.
Empty file modified index.php 100644 → 100755
Empty file.
Empty file modified languages/EUCookieLaw-it_IT.mo 100644 → 100755
Empty file.
Empty file modified languages/EUCookieLaw-it_IT.po 100644 → 100755
Empty file.
Empty file modified languages/default.mo 100644 → 100755
Empty file.
Empty file modified languages/default.po 100644 → 100755
Empty file.
11 changes: 11 additions & 0 deletions readme.md 100644 → 100755
Expand Up @@ -65,6 +65,9 @@ the `EUCookieLaw` initialization expect an Object with the following properties:

* `path` (`string` defualt `/`) defines the path where the consent cookie will be valid.

* `domain` (`string` default setted to `window.location.host` value) defines the domain which to apply the cookie.
**Note:** Define to `false` if the URL is defined by IP instead of domain.

* `cookieList` (`array` default `[]`) the list of techincal cookies the user cannot choose to reject. If some script try
to write one of the listed cookie it will be accepted.
**TIP:** You can use the `*` wildchar as suffix to intend all the cookies that starts with a specific value (eg. `__umt*` will mean `__umta`, `__umtc` and so on).
Expand Down Expand Up @@ -349,6 +352,14 @@ If you want to get involved in this plugin development, then fork the repository

# Changelog

## 2.5.0
* **NEW**: Now you can define the domain where the cookie will be applied
* **IMPROVEMENTS**: Javascript page reload forces contents from server (ignoring browser cache)
* **BUGFIX**: `WP_CONTENT_DIR` defined instead of `EUCL_CONTENT_DIR` causes some problems if site is without cache.
* Minor bugfixes and general improvements
* updated documentation
* updated the version number

## 2.4.0
* **NEW**: Now you can set the number of pixels for consent on scroll
* **NEW**: If not configured (as constants) the agree and disagree links will be auto-generated by the server.
Expand Down
15 changes: 12 additions & 3 deletions readme.txt 100644 → 100755
@@ -1,10 +1,10 @@
=== Plugin Name ===
Contributors: diego-la-monica
Contributors: Diego La Monica
Tags: Cookie, Cookie Law, Law Compliance, EU Cookie Law, blocco preventivo, cookie block, cookie consent, cookie policy, cookie banner
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=me%40diegolamonica%2einfo&lc=IT&item_name=EU%20Cookie%20Law&no_note=0&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
Requires at least: 4.0
Tested up to: 4.2.2
Stable tag: 2.4.0
Tested up to: 4.2.4
Stable tag: 2.5.0
License: LGPLv3
License URI: http://www.gnu.org/licenses/lgpl-3.0-standalone.html

Expand Down Expand Up @@ -48,6 +48,15 @@ For manual installation via FTP

== Changelog ==

= 2.5.0 =
* **NEW**: Now you can define the domain where the cookie will be applied
* **IMPROVEMENTS**: Javascript page reload forces contents from server (ignoring browser cache)
* **IMPROVEMENTS**: Better readability of the header file
* **BUGFIX**: `WP_CONTENT_DIR` defined instead of `EUCL_CONTENT_DIR` causes some problems if site is without cache.
* Minor bugfixes and general improvements
* updated documentation
* updated the version number

= 2.4.0 =
* **NEW**: Now you can set the number of pixels for consent on scroll
* **NEW**: If not configured (as constants) the agree and disagree links will be auto-generated by the server.
Expand Down
Empty file modified templates/EUCookieCache.php 100644 → 100755
Empty file.
Empty file modified templates/htaccess.fragment.txt 100644 → 100755
Empty file.
Empty file modified templates/index.php 100644 → 100755
Empty file.
Empty file modified templates/wp-config.fragment.php 100644 → 100755
Empty file.
Empty file modified wpEUCookieLaw.js 100644 → 100755
Empty file.
Empty file modified wpml-config.xml 100644 → 100755
Empty file.

2 comments on commit 87041b4

@contattolab
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elenco bug che ho riscontrato, da premettere che ho usato sia il mio tema, sia uno dei temi standard di wordpress, i plugin installati al momento dell'utilizzo erano :

-SEO YOAST
-W3 TOTAL CACHE

  • GOOGLE NEWS SITEMAP
  • NextScripts: Social Networks Auto-Poster
  • VISUAL COMPOSER

Dunque, installando EUCOOKIELAW ho riscontrato i seguenti problemi

1- Parse error: syntax error, unexpected $end in /web/htdocs/www.contattolab.it/home/wp-content/plugins/eucookielaw/eucookielaw-wp.php(1106) : eval()'d code on line 1

2 - Il sito viene visualizzato con foglio di stile danneggiato fino all'accettazione e quindi con il successivo caricamento torna alla normalità.

3- Nonostante si effettua l'accettazione in alcuni casi navigando sul sito ti viene riproposto l'accetazione, in altri casi invece non visualizza la pubblicità adsense

4- Con il plugin W3 TOTAL CACHE installato il sito è andato completamente OFFLINE. bisognava eliminare la cache dal plugin stesso e tornava a funzionare, almeno fino a quando l'utente non avrebbe svuotato la propria cache, infatti a seguito di prove, ogni volta che svuotavo la cache il sito andava offline, DISATTIVANDO W3 TOTAL CACHE il sito è tornato online,

5 - Con il plugin attivo tutte le sitemaps che non sono presenti nella cartella principale del server ma vengono ad esempio create da plugin come (SEO YOAST) quindi non visibili all'interno del server ftp risultano essere danneggiate sul sito google web master, nello specifico con questo errore.

La Sitemap è in formato HTML
Sembra che la tua Sitemap sia una pagina HTML. Utilizza un formato Sitemap supportato.

Mentre se il plugin crea una sitemap fisicamente presente nella cartella principale del server (plugin GOOGLE NEWS SITEMAP) la sitemaps risulta funzionare correttamente

6 - I video Youtube non vengono bloccati prventivamente,

@diegolamonica
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ciao @contattolab, non è questo il posto giusto dove segnalare i bug.
Esiste una sezione apposta per segnalare le anomalie ed è https://github.com/diegolamonica/EUCookieLaw/issues.
Ti prego di riportare individualmente gli errori riscontrati (una segnalazione per ogni errore) nella sezione opportuna del sito.

Grazie mille.

Please sign in to comment.