Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#26 2014-08-16 01:13:34

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Global Cookie Control

Hi Tom,

I just realized that in my test code, I had included the original cookie-law-info style sheet but forgot to add it to the code I showed you...

function ttg_canvas_bottom(  $style, $path){
    echo '
    <link rel="stylesheet" id="cookielawinfo-style-css"  href="http://tomowens.openpoint.co.uk/blog/wp-content/plugins/cookie-law-info/css/cli-style.css?ver=3.9.2" type="text/css" media="all" />
    <script type="text/javascript" src="http://tomowens.openpoint.co.uk/blog/wp-content/plugins/cookie-law-info/js/cookielawinfo.js?ver=3.9.2"></script>
    <script type="text/javascript">
   ...

Cheers


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#27 2014-08-16 02:06:17

tomowensphoto
Member
From: Suffolk
Registered: 2012-11-21
Posts: 321
Website

Re: Global Cookie Control

Thanks Daniel,
So that would mean not editing the custom.css to include the content I used?
Regards,
TomO


Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/

Offline

#28 2014-08-16 09:25:16

michilge
Member
From: Sprockhövel, Germany
Registered: 2013-04-15
Posts: 206
Website

Re: Global Cookie Control

Hi all,
I have setup PHPlugins and custom CSS now and the bar appears on all my pages.
I would like to switch off the show-again-tab, but this is harder than it seems, the settings I saved in the settings page of CLI in WP seem to interfere with those in PHPlugins.php.
I thought changing to "showagain_tab":false in phplugins and deselecting "Use Show Again Tab?" in the CLI settings would do, but it doesn't.
Is there another change I must make to phplugins.php?

Regards,
Michael

Offline

#29 2014-08-16 09:32:09

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Global Cookie Control

Michael: I would try to include the CLI css in phplugins as well as I indicated in #26.

Tom: it might work.... didn't had time today to double check it.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#30 2014-08-16 10:13:20

michilge
Member
From: Sprockhövel, Germany
Registered: 2013-04-15
Posts: 206
Website

Re: Global Cookie Control

dl: As I understand it this would spare to load the custom css via phplugins.

I put the call of custom css back between comments and it still works.

One thing I missed was to switch off the cookie bar in the plugin settings entirely to have only one instance appear via phplugins.
Then I set "show_once_yn":false for a change also. The show-again-tab will reappear as long as I stay on one page, but when i change page or reload it will vanish and the info bar will not appear again until i flush my browser cache.

This comes close to what I imagined.

Thank You all.
Michael

Offline

#31 2014-08-17 00:51:29

tomowensphoto
Member
From: Suffolk
Registered: 2012-11-21
Posts: 321
Website

Re: Global Cookie Control

I have now done the same. Updated the phplugins.php with daniel's extra bit of code, commented out the custom.css and made the changes that Michael made to turn off the pop up and bar after accepting. Now I know it is working I am happy with the pop-up and bar behaving this way.
All in all a satisfactory outcome.
Regards,
TomO


Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/

Offline

#32 2014-11-16 14:32:11

john bishop images
Moderator
From: Vancouver, BC, Canada
Registered: 2012-10-05
Posts: 20
Website

Re: Global Cookie Control

Thanks for this guys! Made this relatively easy for me to accomplish.

Couple of suggestions ...

1) Add the if statement shown below so that the PHPlugins version won't run under Wordpress or under Stage. That way you're not potentially stepping on the Wordpress plugin's toes or disrupting a nice full screen slideshow or video. It does mean re-enabling the Cookie Bar in the Wordpress plugin settings though.

function ttg_canvas_bottom(  $style, $path){
    if (G_STYLE != 'CE4-WORDPRESS' && G_STYLE != 'CE4-STAGE')
    echo '

2) I looked through cookielawinfo.js and if you have "Show Again" turned off in Wordpress, it never adds the Show Again block of text to the end of the HTML segment it inserts when the page loads. So ... delete the following code from the end of the "cli_show_cookiebar({ html:" segment.

<div id="cookie-law-info-again"><span id="cookie_hdr_showagain">Privacy & Cookies Policy</span></div>

If you're using "Wear Concrete Boots" for your footer, the screen jumps a bit, but it doesn't redisplay the Show Again segment as it isn't there anymore! And from how I read the code, that's the way it is designed to work, or it's a "feature"! big_smile

See it in action on my test site

;-j

Last edited by john bishop images (2014-11-16 16:50:27)

Offline

#33 2014-11-28 07:15:38

tomowensphoto
Member
From: Suffolk
Registered: 2012-11-21
Posts: 321
Website

Re: Global Cookie Control

Glad you found this thread useful. I'll take a look at your suggestions.


Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/

Offline

Board footer

Powered by FluxBB