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.

#1 2014-08-11 22:57:49

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

Installing Cookie control script

Hi,
I bought Stage at the weekend with a view to adding extra pages. Lofty gave me some advice that I am extremely grateful for however...
I have created an additional page in Stage and uploaded it to the root of my sub-domain. The Pages navigation points to the folder in the root and the page displays nicely.http://tomowens.openpoint.co.uk/index.php
I wanted to deploy a cookie control like we have to over here to cover EU law so I used CIVICUK as I have used their basic control on my non-TTG parent site OKhttp://www.openpoint.co.uk/.
I grabbed the .js file and dumped that in the root of the sub-domain and I also grabbed the script that they say should go in the body area of the page code.  I stuck this in the index.php file but I am not sure it is working.
I have phplugins enabled and my guess is that for this cookie control to work across any page a user lands on then it should maybe be located in the phplugins.php file in the /phplugins folder. I pasted the code in that then nothing was visible so I went back to the unadulterated version and the site is working.
I am a novice when it comes to this php stuff so any guidance would be welcome. I have read through the documentation already so if anyone knows how to implement this code I'll be very appreciative.
Thanks

Last edited by tomowensphoto (2014-08-11 23:26:52)


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

Offline

#2 2014-08-11 23:27:19

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Installing Cookie control script

use the hook ttg_head_end to place the script in the page.

Actually, just try adding the script right after the css stuff in the css section of the phplugins file:

function ttg_head_end( $style, $path ) { 
    echo '
    <link rel="stylesheet" href="/phplugins/css/custom.css" />

        <script>cookies script</script>    

    ';

Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2014-08-11 23:46:35

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

Re: Installing Cookie control script

Thanks Rod,
I've tried that. The site still works so I'm trying to see if the cookie warning activates now.


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

Offline

#4 2014-08-11 23:57:38

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Installing Cookie control script

php can be tricky (says the person who hardly knows anything about it). A misplaced ; or a missing } can just ruin your day smile


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#5 2014-08-12 04:04:42

lofty
Member
From: UK
Registered: 2012-09-26
Posts: 259
Website

Re: Installing Cookie control script

Or coding under the influence Rod smile

Offline

#6 2014-08-12 04:14:36

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Installing Cookie control script

Is that like Photoshopping with Malbec?


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#7 2014-08-12 04:52:13

lofty
Member
From: UK
Registered: 2012-09-26
Posts: 259
Website

Re: Installing Cookie control script

Almost exactly!

Offline

Board footer

Powered by FluxBB