Cookie Control on C5 v5.4.1.1

Permalink
Hi guys,

I have a site with an old install of C5. I am not looking to upgrade it at the moment so if possible would like a work around!

We need to add Cookie Control onto the site but this loads its own 'cookieControl-5.1.min.js' file which means we lose the edit bar along the top..

I am wondering if there is a way around this? I have tried to add the <?php if (!$c->isEditMode()): ?> code <?php endif; ?> but that didnt work

the cookie control code is here:

<script src="http://www.geoplugin.net/javascript.gp" type="text/javascript"></script>
<script src="http://www.domain.co.uk/cookieControl-5.1.min.js" type="text/javascript"></script>
<script type="text/javascript">//<![CDATA[
  cookieControl({
      introText:'<p>This site uses some unobtrusive cookies to store information on your computer.</p>',
      fullText:'<p>Some cookies on this site are essential, and the site won\'t work as expected without them. These cookies are set when you submit a form, login or interact with the site by doing something that goes beyond clicking on simple links.</p><p>We also use some non-essential cookies to anonymously track visitors or enhance your experience of the site. If you\'re not happy with this, we won\'t set these cookies but some nice features of the site may be unavailable.Some cookies on this site are essential, and the site won\'t work as expected without them. These cookies are set when you submit a form, login or interact with the site by doing something that goes beyond clicking on simple links.</p><p>We also use some non-essential cookies to anonymously track visitors or enhance your experience of the site. If you\'re not happy with this, we won\'t set these cookies but some nice features of the site may be unavailable.</p><p>To control third party cookies, you can also adjust your <a href="browser-settings" target="_blank">browser settings</a>.</p><p>By using our site you accept the terms of our <a href="http://www.domain.co.uk/cookies">Privacy Policy</a>.</p>',
      position:'left', // left or right
      shape:'triangle', // triangle or diamond
      theme:'light', // light or dark
      startOpen:true,
      autoHide:6000,
      subdomains:true,
      protectedCookies: [], //list the cookies you do not want deleted ['analytics', 'twitter']
      consentModel:'information_only',
      onAccept:function(){ccAddAnalytics()},


Does anyone have any ideas how to get round the jquery issue and enable the cookie script to load and keep the toolbar!?

thanks for looking!

 
obaluba replied on at Permalink Reply
Does anyone have any ideas on this?

Any help would be great, thanks
VidalThemes replied on at Permalink Reply
VidalThemes
Hi there, Dont know if this will be any help, but we have this exact same solution on our site, we call all the Javascript in the footer, just above the closing body tag, and we have no issues with it clashing with the C5 editing features.
VidalThemes replied on at Permalink Reply
VidalThemes
Sorry forgot to say, we have placed ours under:

<?php   Loader::element('footer_required'); ?>
obaluba replied on at Permalink Reply
Thanks for your reply.

I added the code before and after the footer loader element, but it doesn't show up at all.

I suspect its because its an older version maybe?

I was hoping there was a simple workaround on 5.4.1.1 to get this thing working!

thanks
obaluba replied on at Permalink Reply
This is still causing an issue, does anyone else have any ideas if this will work on 5.4.2.?

thanks for looking