ARV187 Posted September 18, 2014 Report Share Posted September 18, 2014 Hi, in our website we are using google analytics, then recently we installed a cookie control script with this code: <script src="/cookies_permisos/cookieControl-6.2.min.js" type="text/javascript"></script> <script type="text/javascript">//<![CDATA[ cookieControl({ t: { title: '<ul><li>Este sitio usa cookies para guardar información en tu ordenador.</li><li>This site uses cookies to store information on your computer.</li></ul>', intro: '<ul><li>Algunas de estás cookies son esenciales para hacer funcionar correctamente nuestro sitio y nos ayuda a mejorarlo dandonos información de como se usa el sitio. Por favor lee este apartado:<span class="ccc-settings"> <a href="http://argavirtual.com/cookies_permisos/mas-informacion.html" target="_blank">Más información (Español).</a> <p>Al Usar nuestro sitio tu aceptas los terminos de nuestra <a href="http://argavirtual.com/cookies_permisos/politica.html" target="_blank"> PolÃtica de privacidad</a>.</span></li><p><li>Some of these cookies are essential to make our site work and others help us to improve by giving us some insight into how the site is being used. <br /><p>These cookies are set when you submit a form, login or interact with the site by doing something that goes beyond clicking some simple links.</p><p>We also use some non-essential cookies to anonymously track visitors or enhance your experience of this site. If you\'re not happy with this, we won\'t set these cookies but some nice features on the site may be unavailable.</p>To control third party cookies, you can also <span class="ccc-settings">adjust <a href="http://www.allaboutcookies.org/manage-cookies/" target="_blank">your browser settings.</a> <P><p>By using our site you accept the terms of our <a href="http://argavirtual.com/cookies_permisos/politica.html">Privacy Policy</a>.</p></span></li></ul>', full:'<p><span class="ccc-settings"> </span></p><p>.</p>' }, position:CookieControl.POS_LEFT, style:CookieControl.STYLE_TRIANGLE, theme:CookieControl.THEME_LIGHT, // light or dark startOpen:true, autoHide:60000, subdomains:true, protectedCookies: [], // list the cookies you do not want deleted, for example ['analytics', 'twitter'] apiKey: '7a2f596d80da6ca9f001262f0aaded3f31e3c253', product: CookieControl.PROD_FREE, consentModel: CookieControl.MODEL_EXPLICIT, onAccept:function(){ccAddAnalytics()}, onReady:function(){}, onCookiesAllowed:function(){ccAddAnalytics()}, onCookiesNotAllowed:function(){} }); function ccAddAnalytics() { jQuery.getScript("http://www.google-analytics.com/ga.js", function() { var GATracker = _gat._createTracker('UA-xxxxxxxxxx'); GATracker._trackPageview(); }); } //]]> </script> I wrote the code in index.php. But when I go to schedule page to bid all options are showed in same page (find by dep airport, arrive airport, airplan, distance....). And when we do a bid this error message is showed: No route passed Actually I commented the code to fix the issue, but what or where I must write the code to work? I wrote in domain\index.php at first line to prevent that cookies was installed, but seems a wrong site. Quote Link to comment Share on other sites More sharing options...
StartVM Posted September 19, 2014 Report Share Posted September 19, 2014 Hi, in our website we are using google analytics, then recently we installed a cookie control script with this code: <script src="/cookies_permisos/cookieControl-6.2.min.js" type="text/javascript"></script> <script type="text/javascript">//<![CDATA[ cookieControl({ t: { title: '<ul><li>Este sitio usa cookies para guardar información en tu ordenador.</li><li>This site uses cookies to store information on your computer.</li></ul>', intro: '<ul><li>Algunas de estás cookies son esenciales para hacer funcionar correctamente nuestro sitio y nos ayuda a mejorarlo dandonos información de como se usa el sitio. Por favor lee este apartado:<span class="ccc-settings"> <a href="http://argavirtual.com/cookies_permisos/mas-informacion.html" target="_blank">Más información (Español).</a> <p>Al Usar nuestro sitio tu aceptas los terminos de nuestra <a href="http://argavirtual.com/cookies_permisos/politica.html" target="_blank"> PolÃtica de privacidad</a>.</span></li><p><li>Some of these cookies are essential to make our site work and others help us to improve by giving us some insight into how the site is being used. <br /><p>These cookies are set when you submit a form, login or interact with the site by doing something that goes beyond clicking some simple links.</p><p>We also use some non-essential cookies to anonymously track visitors or enhance your experience of this site. If you\'re not happy with this, we won\'t set these cookies but some nice features on the site may be unavailable.</p>To control third party cookies, you can also <span class="ccc-settings">adjust <a href="http://www.allaboutcookies.org/manage-cookies/" target="_blank">your browser settings.</a> <P><p>By using our site you accept the terms of our <a href="http://argavirtual.com/cookies_permisos/politica.html">Privacy Policy</a>.</p></span></li></ul>', full:'<p><span class="ccc-settings"> </span></p><p>.</p>' }, position:CookieControl.POS_LEFT, style:CookieControl.STYLE_TRIANGLE, theme:CookieControl.THEME_LIGHT, // light or dark startOpen:true, autoHide:60000, subdomains:true, protectedCookies: [], // list the cookies you do not want deleted, for example ['analytics', 'twitter'] apiKey: '7a2f596d80da6ca9f001262f0aaded3f31e3c253', product: CookieControl.PROD_FREE, consentModel: CookieControl.MODEL_EXPLICIT, onAccept:function(){ccAddAnalytics()}, onReady:function(){}, onCookiesAllowed:function(){ccAddAnalytics()}, onCookiesNotAllowed:function(){} }); I wrote the code in index.php. But when I go to schedule page to bid all options are showed in same page (find by dep airport, arrive airport, airplan, distance....). And when we do a bid this error message is showed: Actually I commented the code to fix the issue, but what or where I must write the code to work? I wrote in domain\index.php at first line to prevent that cookies was installed, but seems a wrong site. Put the code in a file such as Google.js and link it in your layout.tpl/php file Quote Link to comment Share on other sites More sharing options...
ARV187 Posted September 19, 2014 Author Report Share Posted September 19, 2014 Actually i have this file cookieControl-6.2.min.js with a huge code inside, and this code of first post. Then I put the code in layout.tpl, i will try. Thanks by your answer Quote Link to comment Share on other sites More sharing options...
ARV187 Posted September 19, 2014 Author Report Share Posted September 19, 2014 Not work, i put the code in this position: <?php /*Any custom Javascript should be placed below this line, after the above call */ ?> </head> <body> <?php echo $page_htmlreq; ?> <script src="/cookies_permisos/cookieControl-6.2.min.js" type="text/javascript"></script> <script type="text/javascript">//<![CDATA[ cookieControl({ ......................................... Page afected: /schedules/view Without code work fine: With code its showed bad and show "No route passed" Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted September 19, 2014 Moderators Report Share Posted September 19, 2014 Please read again what he said to you. Put the code in a file such as Google.js and link it in your layout.tpl/php file Quote Link to comment Share on other sites More sharing options...
ARV187 Posted September 19, 2014 Author Report Share Posted September 19, 2014 Please read again what he said to you. Then, layout.tpl call to google.js for example, and google.js code call to cookieControl-6.2.min.js, its a long patch... With this code can I link it changing the patch to google.js? <script src="/cookies_permisos/cookieControl-6.2.min.js" type="text/javascript"></script> a little part content in cookieControl-6.2.min.js, cookieControl version 6.2 (2014-06-25, R263, gerasimos) // Copyright © 2014 Civic UK (http://www.civicuk.com/cookie-law/) if(!Array.prototype.indexOf){Array.prototype.indexOf=function(e,f){for(var b=(f||0),a=this.length;b*{position:relative!important;display:inline-block;float:left}.ccc-bar .ccc-hdr h2{color:#f0942b;display:inline;padding-left:5px}.ccc-bar #ccc-hdricon{background-position:-313px 8px}.ccc-bar .ccc-hdr span.ccc-title{display:inline;padding:11px 9px 8px 9px;font-size:14px}.ccc-bar.ccc-dark .ccc-title{color:#888}.ccc-bar .ccc-c{overflow:hidden;position:fixed;top:50px;right:0;width:337px}.ccc-bar .ccc-ci{display:block;visibility:hidden;position:relative;top:0;right:0;background:#fff;border:solid 1px #888;border-style:none none solid solid;overflow:hidden;width:263px;margin:0 0 7px auto!important;padding:12px 33px;box-shadow:12px -12px 10px 10px #000}.ccc-bar.ccc-dark .ccc-ci{background:#363636;border-color:#000;color:#fff}.ccc-bar.ccc-bottom .ccc-c{top:auto;bottom:50px}.ccc-bar.ccc-bottom .ccc-ci{border-style:solid none none solid;margin:7px 0 0 auto!important;box-shadow:12px 12px 10px 10px #000;padding-top:25px}.ccc-bar #ccc-icon{display:none!important}.ccc-bar .ccc-expand{display:none}#cccwr.ccc-bar .ccc-close{margin-top:-8px;float:right!important;background:#90c944;width:auto;height:auto;text-indent:0;color:white;font-size:13px;line-height:13px;margin-left:20px;margin-right:20px;padding:11px 26px;border-radius:4px;-moz-border-radius:4px;-o-border-radius:4px;-webkit-border-radius:4px}#cccwr.ccc-bar .ccc-bt.ccc-fine{display:none}#cccwr.ccc-bar .ccc-close:hover{box-shadow:inset 1px 1px 5px 1px rgba(0,0,0,0.25);background:#3e3e3e;color:#f0942b}#cccwr.ccc-bar.ccc-dark .ccc-close:hover{box-shadow:inset 1px 1px 7px 0 rgba(0,0,0,0.25);background:#ddd;color:#000}@media only screen and (max-width:768px), and (max-device-width:768px){html #cccwr.ccc-bar .ccc-close{position:absolute!important;top:8px;right:1%;margin:0;width:30%;padding:11px 2.5%;text-align:center}html #cccwr.ccc-bar #ccc-ias{position:absolute!important;top:10px;right:37%;text-indent:-9999px;padding:0;width:32px;height:32px;background-image:url('//apikeys.civiccomputing.com/p/cc/6.2/ccc-icons.png');background-position:-400px 0}html .ccc-open #cccwr.ccc-bar #ccc-ias{background-image:url('//apikeys.civiccomputing.com/p/cc/6.2/ccc-icons.png');background-position:-400px -32px}html #cccwr.ccc-bar .ccc-title{display:none}div#cccwr div.ccc-c{overflow-y:scroll;height:210px;overflow-x:hidden}}@media only screen and (max-width:360px), and (max-device-width:360px){.ccc-bar div#cccw div.ccc-c{overflow-y:scroll;height:auto;max-height:400px;overflow-x:hidden}",html:' .... Quote Link to comment Share on other sites More sharing options...
ARV187 Posted September 20, 2014 Author Report Share Posted September 20, 2014 Now cookie control not work. I did this: 1. Create a file .js named "cookiescrittext.js" in /public_html/cookies_permisos/cookiescrittext.js with the code. 2. Insert this line in layout.tpl in /public_html/lib/skins/myskin/ <?php /*Any custom Javascript should be placed below this line, after the above call */ ?> </head> <body> <?php echo $page_htmlreq; ?> <script src="/cookies_permisos/cookiescrittext.js" type="text/javascript"></script> This are the instruction for cookie control, they provide 1 code to insert in page and 1 js script (cookieControl-6.2.min.js): Step 1 Cookie Control uses jQuery. You don't need to have this installed on your site already - the script will check for this. If you DO have it installed, please just check that you have jQuery version 1.4.4 or later: Cookie Control is not compatible with earlier versions of jQuery. Step 2 Download the Cookie Control script here (cookieControl-6.2.min.js) Upload it to your site. Step 3 Copy the code (left) and update the path to the location where you've placed the Cookie Control Script. You may wish to create an include, embed it directly in your pages, or add it to an existing "footer" include for your site. It's entirely up to you. Either way, the code needs to be within the <body> tag of your page. The code (this is code that you said me to put in a file .js): <script src="/cookies_permisos/cookieControl-6.2.min.js" type="text/javascript"></script> <script type="text/javascript">//<![CDATA[ cookieControl({ t: { title: '<ul><li>Este sitio usa cookies para guardar información en tu ordenador.</li><li>This site uses cookies to store information on your computer.</li></ul>', intro: '<ul><li>Algunas de estás cookies son esenciales para hacer funcionar correctamente nuestro sitio y nos ayuda a mejorarlo dandonos información de como se usa el sitio. Por favor lee este apartado:<span class="ccc-settings"> <a href="http://argavirtual.com/cookies_permisos/mas-informacion.html" target="_blank">Más información (Español).</a> <p>Al Usar nuestro sitio tu aceptas los terminos de nuestra <a href="http://argavirtual.com/cookies_permisos/politica.html" target="_blank"> PolÃtica de privacidad</a>.</span></li><p><li>Some of these cookies are essential to make our site work and others help us to improve by giving us some insight into how the site is being used. <br /><p>These cookies are set when you submit a form, login or interact with the site by doing something that goes beyond clicking some simple links.</p><p>We also use some non-essential cookies to anonymously track visitors or enhance your experience of this site. If you\'re not happy with this, we won\'t set these cookies but some nice features on the site may be unavailable.</p>To control third party cookies, you can also <span class="ccc-settings">adjust <a href="http://www.allaboutcookies.org/manage-cookies/" target="_blank">your browser settings.</a> <P><p>By using our site you accept the terms of our <a href="http://argavirtual.com/cookies_permisos/politica.html">Privacy Policy</a>.</p></span></li></ul>', full:'<p><span class="ccc-settings"> </span></p><p>.</p>' }, position:CookieControl.POS_LEFT, style:CookieControl.STYLE_TRIANGLE, theme:CookieControl.THEME_LIGHT, // light or dark startOpen:true, autoHide:60000, subdomains:true, protectedCookies: [], // list the cookies you do not want deleted, for example ['analytics', 'twitter'] apiKey: '7a2f596d80da6ca9f001262f0aaded3f31e3c253', product: CookieControl.PROD_FREE, consentModel: CookieControl.MODEL_EXPLICIT, onAccept:function(){ccAddAnalytics()}, onReady:function(){}, onCookiesAllowed:function(){ccAddAnalytics()}, onCookiesNotAllowed:function(){} }); function ccAddAnalytics() { jQuery.getScript("http://www.google-analytics.com/ga.js", function() { var GATracker = _gat._createTracker('UA-xxxxxxxxxx'); GATracker._trackPageview(); }); } //]]> </script> Step 4 Apply Cookie Control events to your cookie-dropping scripts. This will ensure that they won't drop cookies unless a user has opted in. Step 5 Review our deployment and updates pages as they contain useful tips and news on using Cookie Control. View the full documentation for Cookie Control 6. Any idea? Quote Link to comment Share on other sites More sharing options...
mseiwald Posted September 20, 2014 Report Share Posted September 20, 2014 the path is wrong. it gives a not found error http://argavirtual.com/public_html/cookies_permisos/cookiescrittext.js it surely should be without public_html Quote Link to comment Share on other sites More sharing options...
ARV187 Posted September 20, 2014 Author Report Share Posted September 20, 2014 the path is wrong. it gives a not found error http://argavirtual.com/public_html/cookies_permisos/cookiescrittext.js it surely should be without public_html Patch in host its right, its default folder to upload content, to any others things work ever without /public_html/, if you see the code in spoiler you can see the patch to work without /public_html/. Not its the fail unfortunately. Quote Link to comment Share on other sites More sharing options...
mseiwald Posted September 20, 2014 Report Share Posted September 20, 2014 Now it has a SyntaxError. Just check the inspect functions of your Webbrowser and you will see The error Messages. Quote Link to comment Share on other sites More sharing options...
ARV187 Posted September 20, 2014 Author Report Share Posted September 20, 2014 Now it has a SyntaxError. Just check the inspect functions of your Webbrowser and you will see The error Messages. Where? in http://argavirtual.c...iescrittext.js ? Quote Link to comment Share on other sites More sharing options...
mseiwald Posted September 20, 2014 Report Share Posted September 20, 2014 It says unexpected > or < at line 1? Quote Link to comment Share on other sites More sharing options...
mseiwald Posted September 20, 2014 Report Share Posted September 20, 2014 I see you are using script Tags in a js file. That doesnt work. In a js file you cant use script Tags. They are giving The Syntax error. Quote Link to comment Share on other sites More sharing options...
ARV187 Posted September 20, 2014 Author Report Share Posted September 20, 2014 I see you are using script Tags in a js file. That doesnt work. In a js file you cant use script Tags. They are giving The Syntax error. Yes, i did that they said me, create a .js file with the code. The code its created to insert in a page, not a js file. I dont know about js tags. Quote Link to comment Share on other sites More sharing options...
mseiwald Posted September 20, 2014 Report Share Posted September 20, 2014 is a html Tag. In a js file you only put the Script code without the Tags. You cant put any html Tags in a js file. Quote Link to comment Share on other sites More sharing options...
ARV187 Posted September 20, 2014 Author Report Share Posted September 20, 2014 I delete <script></script> tags? Quote Link to comment Share on other sites More sharing options...
ARV187 Posted September 20, 2014 Author Report Share Posted September 20, 2014 is a html Tag. In a js file you only put the Script code without the Tags. You cant put any html Tags in a js file. Thanks that was useful!! But i return to initial issue. I used this page http://www.nullskull...es/20060517.asp to convert html code to js code. This is the result: document.writeln('<script src="\/cookies_permisos\/cookieControl-6.2.min.js" type="text\/javascript"><\/script>\n <script type="text\/javascript">\/\/<![CDATA[\n cookieControl({\n t: {\n title: \'<ul><li>Este sitio usa cookies para guardar información en tu ordenador.<\/li><li>This site uses cookies to store information on your computer.<\/li><\/ul>\',\n intro: \'<ul><li>Algunas de estás cookies son esenciales para hacer funcionar correctamente nuestro sitio y nos ayuda a mejorarlo dandonos información de como se usa el sitio. Por favor lee este apartado:<span class="ccc-settings"> <a href="http:\/\/argavirtual.com\/cookies_permisos\/mas-informacion.html" target="_blank">Más información (Español).<\/a> <p>Al Usar nuestro sitio tu aceptas los terminos de nuestra <a href="http:\/\/argavirtual.com\/cookies_permisos\/politica.html" target="_blank"> PolÃtica de privacidad<\/a>.<\/span><\/li><p><li>Some of these cookies are essential to make our site work and others help us to improve by giving us some insight into how the site is being used. <br \/><p>These cookies are set when you submit a form, login or interact with the site by doing something that goes beyond clicking some simple links.<\/p><p>We also use some non-essential cookies to anonymously track visitors or enhance your experience of this site. If you\\\'re not happy with this, we won\\\'t set these cookies but some nice features on the site may be unavailable.<\/p>To control third party cookies, you can also <span class="ccc-settings">adjust <a href="http:\/\/www.allaboutcookies.org\/manage-cookies\/" target="_blank">your browser settings.<\/a> <P><p>By using our site you accept the terms of our <a href="http:\/\/argavirtual.com\/cookies_permisos\/politica.html">Privacy Policy<\/a>.<\/p><\/span><\/li><\/ul>\',\n full:\'<p><span class="ccc-settings"> <\/span><\/p><p>.<\/p>\'\n },\n position:CookieControl.POS_LEFT,\n style:CookieControl.STYLE_TRIANGLE,\n theme:CookieControl.THEME_LIGHT, \/\/ light or dark\n startOpen:true,\n autoHide:60000,\n subdomains:true,\n protectedCookies: [], \/\/ list the cookies you do not want deleted, for example [\'analytics\', \'twitter\']\n apiKey: \'7a2f596d80da6ca9f001262f0aaded3f31e3c253\',\n product: CookieControl.PROD_FREE,\n consentModel: CookieControl.MODEL_EXPLICIT,\n onAccept:function(){ccAddAnalytics()},\n onReady:function(){},\n onCookiesAllowed:function(){ccAddAnalytics()},\n onCookiesNotAllowed:function(){}\n });\n \n function ccAddAnalytics() {\n jQuery.getScript("http:\/\/www.google-analytics.com\/ga.js", function() {\n var GATracker = _gat._createTracker(\'UA-31283679-5\');\n GATracker._trackPageview();\n });\n }\n \/\/]]>\n <\/script>'); Now cookie control work, but have the initial problem, in /schedules/view not its showed as normaly: (normal view) With code its showed bad and show "No route passed" in bid action: (bad view) Quote Link to comment Share on other sites More sharing options...
mseiwald Posted September 20, 2014 Report Share Posted September 20, 2014 We'll i'm only on my phone now but then you will have a different conflict there. Just use the inspect functions of your Webbrowser and you will see the errors that are causing the issue. Quote Link to comment Share on other sites More sharing options...
ARV187 Posted September 20, 2014 Author Report Share Posted September 20, 2014 I see this with firebug in http://argavirtual.com/index.php/schedules/view can anyone say me if this is the problem and how fix it? 1. TypeError: $(...).ajaxForm is not a function http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js Line 26 2. ReferenceError: Ez is not defined ...a.Cj){var b=null;P.A().dh&&(b=az(a.Ba));a.Cj=new Ez(a.Aa(),a.wa,a.Yo,}return a... id.html (lÃnea 923, col 264) 3. NS_ERROR_IN_PROGRESS: Component returned failure code: 0x804b000f (NS_ERROR_IN_PROGRESS) [nsICacheEntry.dataSize] netCacheReader.js (lÃnea 294) <Sistema> 4. NS_ERROR_IN_PROGRESS: Component returned failure code: 0x804b000f (NS_ERROR_IN_PROGRESS) [nsICacheEntry.dataSize] netCacheReader.js (lÃnea 270) <Sistema> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.