Page 1 of 2 12 LastLast
Results 1 to 10 of 174

Hybrid View

  1. #1
    Join Date
    Nov 2006
    Posts
    10
    Plugin Contributions
    0

    Default Re: Cookie Control Support Thread

    I can't seem to get this to work. No pop-up is displayed although I can see the code near the closing body tag and up in the head. I have the head code listed twice in the source for some reason directly one below the other which will probably have something to do with the problem but I'm unsure as to why it's been inserted twice.

    All files have been uploaded twice as a precaution, all configured via the site admin.

    BTW does the script in the head need to be so large?

  2. #2
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: Cookie Control Support Thread

    without a link to your site it is hard to guess what went wrong.

    the script is as it was shipped by Civic. You could split it up into three file (script, css and html(php)), but that is up to your own creativity

  3. #3
    Join Date
    Nov 2006
    Posts
    10
    Plugin Contributions
    0

    Default Re: Cookie Control Support Thread

    >without a link to your site it is hard to guess what went wrong.

    www.natural-alternative-products.co.uk

    >the script is as it was shipped by Civic. You could split it up into three file (script, css and html(php)), but that is up to your own creativity

    I'd rather try and get this working than start coding. :)

  4. #4
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: Cookie Control Support Thread

    looking at your source code it is not only the script loading twice, but all you css an scripts.
    Once the normal way and once minified.
    I think you did something wrong in your header.php file when you installed the css loader

  5. #5
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: Cookie Control Support Thread

    You also have a rewrite module for your urls active, maybe that's not configured properly

  6. #6
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: Cookie Control Support Thread

    I submitted version 1.3

    The biggest change is the removal of the css from the javascript, and putting it in its own css file. This way it is much easier to customize. It also makes the script a lot smaller.
    The seccond change is also in jscript_cookieControl-5.1.min.php. I changed some code, so the jquery from google will be called using https when applicable

  7. #7
    Join Date
    Apr 2010
    Posts
    319
    Plugin Contributions
    0

    Default Re: Cookie Control Support Thread

    Hi,
    i have installed this but think it is effecting my ssl, no padlock showing

    www.onyourbike.co.uk

    have i installed it properly ?

    i did change 2 files and got padlock to show but have removed it in case im not correct

    i changed the 3 images in css file, i uploaded them to my site and changed

    *background-image: url(./includes/templates/onyourbike/images/ccc-icons.gif);
    *background-image: url(./includes/templates/onyourbike/images/widget-x.gif);
    *background-image: url(./includes/templates/onyourbike/images/switch.png);

    i changed tpl_cookie_control.php

    PHP Code:
    <?php
    if ($request_type == 'NONSSL') { ?>
    <script src="http://www.geoplugin.net/javascript.gp" type="text/javascript"></script>
    <?php } else { ?>
    <script src="https://ssl.geoplugin.net/javascript.gp" type="text/javascript"></script>
    <?php ?>
    <?php 
    if ($request_type == 'NONSSL') { ?>
    <script type="text/javascript">//<![CDATA[
      cookieControl({
          introText:'<?php echo COOKIE_CONTROL_INTROTEXT;?>',
          fullText:'<p><?php echo COOKIE_CONTROL_FULLTEXT;?> <a href="<?php echo HTTP_SERVER DIR_WS_CATALOG;?>index.php?main_page=privacy">Privacy Policy</a>.</p>',
          cookieOnText:'<?php echo COOKIE_CONTROL_COOKIES_ON;?>',
          cookieOffText:'<?php echo COOKIE_CONTROL_COOKIES_OFF;?>',
          position:'<?php echo COOKIE_CONTROL_POSITION;?>',
          shape:'<?php echo COOKIE_CONTROL_SHAPE;?>',
          theme:'<?php echo COOKIE_CONTROL_THEME;?>',
          startOpen:<?php echo COOKIE_CONTROL_STARTOPEN;?>, // true , false
          autoHide:<?php echo COOKIE_CONTROL_AUTOHIDE;?>, // Time in miliseconds
          protectedCookies: [<?php echo COOKIE_CONTROL_PROTECTEDCOOKIES;?>], //list the cookies you do not want deleted ['analytics', 'twitter']
          consentModel:'<?php echo COOKIE_CONTROL_CONSENTMODEL;?>', // information_only , implicit , explicit
          subdomains:<?php echo COOKIE_CONTROL_SUBDOMAINS;?>, // true , false
          onAccept:function(){ccAddAnalytics();},
          onReady:function(){},
          onCookiesAllowed:function(){ccAddAnalytics();},
          onCookiesNotAllowed:function(){},
          countries:'<?php echo COOKIE_CONTROL_COUNTRIES;?>' // Or supply a list ['United Kingdom', 'Greece']
          });

          function ccAddAnalytics() {
            jQuery.getScript("http://www.google-analytics.com/ga.js", function() {
              var GATracker = _gat._createTracker('<?php echo COOKIE_CONTROL_GOOGLE_ANALYTICS ?>');
              GATracker._trackPageview();
            });
          }
       //]]>
    </script>
    <?php } else { ?>
    <script type="text/javascript">//<![CDATA[
      cookieControl({
          introText:'<?php echo COOKIE_CONTROL_INTROTEXT;?>',
          fullText:'<p><?php echo COOKIE_CONTROL_FULLTEXT;?> <a href="<?php echo HTTP_SERVER DIR_WS_CATALOG;?>index.php?main_page=privacy">Privacy Policy</a>.</p>',
          cookieOnText:'<?php echo COOKIE_CONTROL_COOKIES_ON;?>',
          cookieOffText:'<?php echo COOKIE_CONTROL_COOKIES_OFF;?>',
          position:'<?php echo COOKIE_CONTROL_POSITION;?>',
          shape:'<?php echo COOKIE_CONTROL_SHAPE;?>',
          theme:'<?php echo COOKIE_CONTROL_THEME;?>',
          startOpen:<?php echo COOKIE_CONTROL_STARTOPEN;?>, // true , false
          autoHide:<?php echo COOKIE_CONTROL_AUTOHIDE;?>, // Time in miliseconds
          protectedCookies: [<?php echo COOKIE_CONTROL_PROTECTEDCOOKIES;?>], //list the cookies you do not want deleted ['analytics', 'twitter']
          consentModel:'<?php echo COOKIE_CONTROL_CONSENTMODEL;?>', // information_only , implicit , explicit
          subdomains:<?php echo COOKIE_CONTROL_SUBDOMAINS;?>, // true , false
          onAccept:function(){ccAddAnalytics();},
          onReady:function(){},
          onCookiesAllowed:function(){ccAddAnalytics();},
          onCookiesNotAllowed:function(){},
          countries:'<?php echo COOKIE_CONTROL_COUNTRIES;?>' // Or supply a list ['United Kingdom', 'Greece']
          });

          function ccAddAnalytics() {
            jQuery.getScript("https://www.google-analytics.com/ga.js", function() {
              var GATracker = _gat._createTracker('<?php echo COOKIE_CONTROL_GOOGLE_ANALYTICS ?>');
              GATracker._trackPageview();
            });
          }
       //]]>
    </script>
    <?php ?>
    can anyone let me know if this is correct

    thanks
    bn
    Last edited by bn17311; 30 Nov 2012 at 11:08 PM.

  8. #8
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: Cookie Control Support Thread

    Hi Brian,

    You are right, the problem was the google code not being called through https.

    I altered oyur solution a little to keep the code more maintainable

    This is how it will look in a next release, if nothing else changes

    PHP Code:
    <?php
    if ($request_type == 'NONSSL') { ?>
    <script src="http://www.geoplugin.net/javascript.gp" type="text/javascript"></script>
    <?php } else { ?>
    <script src="https://ssl.geoplugin.net/javascript.gp" type="text/javascript"></script>
    <?php ?>
    <script type="text/javascript">//<![CDATA[
      cookieControl({
          introText:'<?php echo COOKIE_CONTROL_INTROTEXT;?>',
          fullText:'<p><?php echo COOKIE_CONTROL_FULLTEXT;?> <a href="<?php echo HTTP_SERVER DIR_WS_CATALOG;?>index.php?main_page=privacy">Privacy Policy</a>.</p>',
          cookieOnText:'<?php echo COOKIE_CONTROL_COOKIES_ON;?>',
          cookieOffText:'<?php echo COOKIE_CONTROL_COOKIES_OFF;?>',
          position:'<?php echo COOKIE_CONTROL_POSITION;?>',
          shape:'<?php echo COOKIE_CONTROL_SHAPE;?>',
          theme:'<?php echo COOKIE_CONTROL_THEME;?>',
          startOpen:<?php echo COOKIE_CONTROL_STARTOPEN;?>, // true , false
          autoHide:<?php echo COOKIE_CONTROL_AUTOHIDE;?>, // Time in miliseconds
          protectedCookies: [<?php echo COOKIE_CONTROL_PROTECTEDCOOKIES;?>], //list the cookies you do not want deleted ['analytics', 'twitter']
          consentModel:'<?php echo COOKIE_CONTROL_CONSENTMODEL;?>', // information_only , implicit , explicit
          subdomains:<?php echo COOKIE_CONTROL_SUBDOMAINS;?>, // true , false
          onAccept:function(){ccAddAnalytics();},
          onReady:function(){},
          onCookiesAllowed:function(){ccAddAnalytics();},
          onCookiesNotAllowed:function(){},
          countries:'<?php echo COOKIE_CONTROL_COUNTRIES;?>' // Or supply a list ['United Kingdom', 'Greece']
          });
    <?php if ($request_type == 'NONSSL') { ?>
          function ccAddAnalytics() {
            jQuery.getScript("http://www.google-analytics.com/ga.js", function() {
              var GATracker = _gat._createTracker('<?php echo COOKIE_CONTROL_GOOGLE_ANALYTICS ?>');
              GATracker._trackPageview();
            });
    <?php } else { ?>
          function ccAddAnalytics() {
            jQuery.getScript("https://www.google-analytics.com/ga.js", function() {
              var GATracker = _gat._createTracker('<?php echo COOKIE_CONTROL_GOOGLE_ANALYTICS ?>');
              GATracker._trackPageview();
            });
    <?php ?> 
          }
       //]]>
    </script>
    I had not noticed this fault myself, because I use an altered version to work with the Simple analytics module from berezin

  9. #9
    Join Date
    Apr 2010
    Posts
    319
    Plugin Contributions
    0

    Default Re: Cookie Control Support Thread

    thanks

    bn

  10. #10
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: Cookie Control Support Thread

    I just submitted an update.
    Version 1.4

    Cookie Control v1.4 Change-log
    • Resolved another https issue
    • Added an option to hide Cookie Control completely after the customer has given consent
    • Updated Readme

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 22
    Last Post: 26 Jan 2026, 06:47 AM
  2. EasyPopulate 4.0 Support Thread
    By chadderuski in forum Addon Admin Tools
    Replies: 3672
    Last Post: 11 Sep 2025, 05:07 PM
  3. BackUp ZC [Support Thread]
    By skipwater in forum All Other Contributions/Addons
    Replies: 285
    Last Post: 23 Dec 2020, 10:40 AM
  4. SysCheck [support thread]
    By swguy in forum All Other Contributions/Addons
    Replies: 36
    Last Post: 24 Oct 2020, 05:28 AM
  5. Replies: 7
    Last Post: 7 Apr 2011, 10:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg