';
+
+ return $jsource;
+ /*}*/
}
/**
@@ -146,14 +161,7 @@ function cookiecontrol_onacceptance() {
$cookiecontrol_acceptancecallback = "function cookiecontrol_accepted(cc) {\n" . implode("\n", $callbacks) . "\n}";
- drupal_add_js($cookiecontrol_acceptancecallback, array(
- 'type' => 'inline',
- 'preprocess' => TRUE,
- 'scope' => 'footer',
- 'group' => JS_DEFAULT,
- 'every_page' => TRUE,
- 'cache' => TRUE,
- ));
+ drupal_add_js($cookiecontrol_acceptancecallback, 'inline', 'footer', FALSE, TRUE, TRUE);
}
/**
@@ -167,14 +175,7 @@ function cookiecontrol_cookiesallowed() {
$cookiecontrol_cookiesallowedcallback = "function cookiecontrol_cookiesallowed(cc) {\n" . implode("\n", $callbacks) . "\n}";
- drupal_add_js($cookiecontrol_cookiesallowedcallback, array(
- 'type' => 'inline',
- 'preprocess' => TRUE,
- 'scope' => 'footer',
- 'group' => JS_DEFAULT,
- 'every_page' => TRUE,
- 'cache' => TRUE,
- ));
+ drupal_add_js($cookiecontrol_cookiesallowedcallback, 'inline', 'footer', FALSE, TRUE, TRUE);
}
/**
@@ -188,27 +189,32 @@ function cookiecontrol_cookiesnotallowed() {
$cookiecontrol_cookiesnotallowedcallback = "function cookiecontrol_cookiesnotallowed(cc) {\n" . implode("\n", $callbacks) . "\n}";
- drupal_add_js($cookiecontrol_cookiesnotallowedcallback, array(
- 'type' => 'inline',
- 'preprocess' => TRUE,
- 'scope' => 'footer',
- 'group' => JS_DEFAULT,
- 'every_page' => TRUE,
- 'cache' => TRUE,
- ));
+ drupal_add_js($cookiecontrol_cookiesnotallowedcallback, 'inline', 'footer', FALSE, TRUE, TRUE);
+}
+
+/**
+ * Implements hook_init().
+ */
+function cookiecontrol_init() {
+ $path = drupal_get_path('module', 'cookiecontrol');
+ drupal_add_css($path . '/css/eu_cookie_compliance.css');
+ drupal_add_js($path . '/js/cookieControl-4.1.min.js', 'module', 'footer');
}
/**
* If cookie consent has not yet been given add a validation callback to tell the user and disable any submission callbacks
*/
-function cookiecontrol_form_user_login_block_alter(&$form, &$form_state, $form_id) {
- if ($s = cookiecontrol_userinrestrictedcountry()) {
- if (!isset($_COOKIE[cookiecontrol_generatesitecookie()]) || $_COOKIE[cookiecontrol_generatesitecookie()] != 'yes') {
- // Repalce all validation callbacks with just one telling the visitor they cannot log in yet
- $form['#validate'] = array('cookiecontrol_user_login_ban');
+//function cookiecontrol_form_user_login_block_alter(&$form, &$form_state, $form_id) {
+function cookiecontrol_form_alter($form_id, &$form) {
+ if ($form_id == 'user_login_block' || $form_id == 'user_login') {
+ if ($s = cookiecontrol_userinrestrictedcountry()) {
+ if (!isset($_COOKIE[cookiecontrol_generatesitecookie()]) || $_COOKIE[cookiecontrol_generatesitecookie()] != 'yes') {
+ // Repalce all validation callbacks with just one telling the visitor they cannot log in yet
+ $form['#validate'] = array('cookiecontrol_user_login_ban');
- // Remove any existing submit handlers to prevent any authentication taking place
- unset($form['#submit']);
+ // Remove any existing submit handlers to prevent any authentication taking place
+ unset($form['#submit']);
+ }
}
}
}
@@ -237,8 +243,29 @@ function cookiecontrol_userinrestrictedcountry() {
if ($request->code == 200) {
$geo_info = unserialize($request->data);
return stripos($cookiecontrol_countries, $geo_info['geoplugin_countryName']) !== FALSE ? TRUE : FALSE;
- } else {
+ }
+ else {
watchdog('Cookie Control', 'A visitors IP address could not be matched to a location so they were not blocked from logging in. Geoplugin returned the error [@code] @message', array('@code' => $request->code, '@message' => $request->status_message), WATCHDOG_ERROR);
return TRUE;
}
+}
+
+/**
+ * Drupal 7 Backported functions
+ */
+ function cookiecontrol_clean_css_identifier($identifier, $filter = array(' ' => '-', '_' => '-', '/' => '-', '[' => '-', ']' => '')) {
+ // By default, we filter using Drupal's coding standards.
+ $identifier = strtr($identifier, $filter);
+
+ // Valid characters in a CSS identifier are:
+ // - the hyphen (U+002D)
+ // - a-z (U+0030 - U+0039)
+ // - A-Z (U+0041 - U+005A)
+ // - the underscore (U+005F)
+ // - 0-9 (U+0061 - U+007A)
+ // - ISO 10646 characters U+00A1 and higher
+ // We strip out any character not in the above list.
+ $identifier = preg_replace('/[^\x{002D}\x{0030}-\x{0039}\x{0041}-\x{005A}\x{005F}\x{0061}-\x{007A}\x{00A1}-\x{FFFF}]/u', '', $identifier);
+
+ return $identifier;
}
\ No newline at end of file
diff --git a/js/cookieControl-4.1.min.js b/js/cookieControl-4.1.min.js
old mode 100644
new mode 100755
diff --git a/modules/cookie_googleanalytics/cookie_googleanalytics.info b/modules/cookie_googleanalytics/cookie_googleanalytics.info
deleted file mode 100644
index 859389f..0000000
--- a/modules/cookie_googleanalytics/cookie_googleanalytics.info
+++ /dev/null
@@ -1,6 +0,0 @@
-; $Id$
-name = "Cookie Control for Google Analytics"
-description = "Disabled Google Analytics form tracking until visitor consents"
-dependencies[] = "cookiecontrol"
-dependencies[] = "googleanalytics"
-core = 7.x
diff --git a/modules/cookie_googleanalytics/cookie_googleanalytics.module b/modules/cookie_googleanalytics/cookie_googleanalytics.module
deleted file mode 100644
index 44aee30..0000000
--- a/modules/cookie_googleanalytics/cookie_googleanalytics.module
+++ /dev/null
@@ -1,40 +0,0 @@
-
- */
-
-/**
- * Add the analytics javascript callback to the list for on acceptance
- */
-function cookie_googleanalytics_cookieaccept_alter(&$callbacks) {
- $callbacks[] = 'ccAddAnalytics();';
-}
-
-/**
- * Add the analytics javascript callback to the list for already consenting visitors
- */
-function cookie_googleanalytics_cookiesallowed_alter(&$callbacks) {
- $callbacks[] = 'ccAddAnalytics();';
-}
-
-/**
- * Remove the standard Google Analytics code from the header and place in
- * a function which can be called manually when appropriate
- */
-function cookie_googleanalytics_js_alter(&$javascript) {
- // Find the Google Analytics code. Wish there was a better keyed way to find the code :-(
- foreach($javascript as $key => $script) {
- if (is_string($script['data']) && strpos($script['data'], '/ga.js') > 0) {
-
- // Wrap code in a callback function
- $script = "function ccAddAnalytics() {\n" . $script['data'] . "\n}";
-
- // Substitue the original script snippet with our function wrapped version
- $javascript[$key]['data'] = $script;
- }
- }
-}
cc.setCookie('ccShowCookieIcon', 'no');jQuery('#ccc-icon').hide();
ccAddHtmlClass();
}
//-->
quatipua
Gio, 07/24/2014 - 22:30
Collegamento permanente
Appena messi sul comodino:
Appena messi sul comodino-kindle:
Sidorec
I Signori delle Balene
:)
LaPiccolaVolante
Ven, 07/25/2014 - 00:40
Collegamento permanente
Evviva! Poi di ebook sul
Evviva! Poi di ebook sul comodino ce ne stanno proprio tanti tanti tanti
ambrous
Ven, 07/25/2014 - 17:39
Collegamento permanente
Domanda
Si può commentare anche un libro appena terminato? O solo quello in lettura?
LaPiccolaVolante
Ven, 07/25/2014 - 21:39
Collegamento permanente
Anche quelli terminati...
Anche quelli terminati... basta che non ci sveli il finale
Schiumanera
Mer, 11/19/2014 - 06:44
Collegamento permanente
Balena e balenottero hanno
Balena e balenottero hanno appena iniziato a leggere I signori delle balene... u.u
LaPiccolaVolante
Mer, 11/19/2014 - 12:38
Collegamento permanente
Vi piacerà?
Vi piacerà?
Lo sa il mare...
Buona Lettura
Kriash
Mer, 11/19/2014 - 14:39
Collegamento permanente
:D
:D
Ali
Ven, 04/10/2015 - 22:00
Collegamento permanente
Visto che c'è questa bella
Visto che c'è questa bella sezione e nessuno la usa, ne approfitto e rompo un po' le scatoline a voi altri naviganti. Allora, i miei libri in lettura sono tre:
- Pane Volume 3 di un certo tizio che non sto a nominare tanto non lo conoscete di sicuro (!!!) che ADORO, capito? A-D-O-R-O! Perchè si e stop (poi pubblicherò la recensione e capirete).
- Città di Carta di J. Green che ho quasi finito e ho trovato davvero carino, nonostante le critiche mosse contro quest autore a me sono piaciuti parecchio i suoi libri. Poi io sono una dall'emozione repentina quindi giocano tutti facile con me
- Il ragazzo dei mondi infiniti di N.Gaiman e M.Reaves consigliato e iniziato da pochissimo, mi sta incuriosendo molto quindi le premesse sono buone!
Detto questo tolgo il disturbo e se qualcuno avesse qualche bel libro da consigliare scrivete e scrivete, sono avida di consigli! Ciao Ciao
Beki Road
Ven, 04/10/2015 - 22:21
Collegamento permanente
Bello bello bello...io mi sto
Bello bello bello...io mi sto dando a Pane #1 e in attesa ci sono gli altri...ihihihih si quel tizio l'ho sentito appena nominare...ihihihiihih
LaPiccolaVolante
Sab, 04/11/2015 - 09:31
Collegamento permanente
Date a queste due donne l
Date a queste due donne l'apocalisse!
grilloz
Mar, 04/14/2015 - 14:36
Collegamento permanente
Un classico
Sul comodino quasi terminato ho "il barone rampante", non credo servano altri commenti ;)
Beki Road
Mar, 04/14/2015 - 16:05
Collegamento permanente
Sai che non l'ho mai finito??
Sai che non l'ho mai finito??? Io e i classici non abbiamo un buon rapporto...credo di essere l'unica a non aver mai letto neanche Il Piccolo Principe O.o ditemi che non sono davvero l'unica!!!!!!!
LaPiccolaVolante
Mar, 04/14/2015 - 23:13
Collegamento permanente
Mi sa di sì Beki :°D. Io oggi
Mi sa di sì Beki :°D. Io oggi comincio L'Atlante di Tenebra e speriamo sia una bella avventura :) (La Capitana. Sì nun c'avevo voglia di rifare il login)
Beki Road
Mar, 04/14/2015 - 23:55
Collegamento permanente
Ahahahahah grande Cap (a)
Ahahahahah grande Cap (a)
Bene allora sono una capra -.-'
Però ho appena iniziato Pane Volume 2!!!
grilloz
Mer, 04/15/2015 - 11:07
Collegamento permanente
Io sono arrivato a 40 anni
Io sono arrivato a 40 anni per prendorlo in mano, per leggere c'e' sempre tempo ;)
quatipua
Mar, 10/13/2015 - 18:33
Collegamento permanente
La Foglia Nera
Pag. 138
sono arrivata qui
"Era convinto di poter dimenticare tutto il passato, ma si sbagliava."
Non riesco davvero a capire come abbiano fatto a godersi questo libro le genti che:
a) hanno letto 1 sola volta I Signori delle Balene
b) non hanno letto nemmeno 1 volta Pane (1,2,3) e Fiaba
c) varie ed eventuali
Voi dove siete arrivati?
Cosa state leggendo?
Bjorn
Ven, 10/23/2015 - 12:26
Collegamento permanente
Un Lavoro Sporco - Christophere Moore
Sto leggendo questo libro... In realtà è un po' che sta in macchina, lo leggo quando sono in anticipo agli appuntamenti di lavoro perché: so che se lo portassi a casa finirebbe come con la foglia nera. 18 ore di chiusa e moglie furiosa.
Divertentissimo e sopra le righe, non si volta una pagina senza un sorriso e non si chiude un capitolo senza aver riflettuto seriamente su qualcosa di importante (mentre si continua a sorridere). L'autore suggerisce anche, in modo consapevole e originale, una sonudtrack per alcune parti del libro, facendo mugugnare qualche motivetto ai personaggi o spingendoli a citare qualche canzone.
Mi sta piacendo al punto che vorrei non finisse così in fretta.
LaPiccolaVolante
Gio, 10/22/2015 - 10:09
Collegamento permanente
La copertina è deliziosa,
La copertina è deliziosa, ispira assai. Grazie per il consiglio!