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 2015-01-21 08:48:50

ndweekes
Member
From: Plymouth, UK
Registered: 2013-12-26
Posts: 6
Website

End body tag in CE3 Blog

Hi
I need to past some code to do with affiliate tracking into my CE3 blog. The instructions say it needs to go just before the end body tag in footer.php, however I can't find that tag!


Nathan

Offline

#2 2015-01-21 09:16:42

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

Re: End body tag in CE3 Blog

use phplugins to do this: http://ce3wiki.theturninggate.net/doku. … _phplugins

the hook will be: ttg_body_bottom to place it just before the closing body tag
http://ce3wiki.theturninggate.net/doku. … ody_bottom

and the G_STYLE identifier will be: CE3-WORDPRESS
http://ce3wiki.theturninggate.net/doku. … _wordpress


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 2015-01-23 05:07:21

ndweekes
Member
From: Plymouth, UK
Registered: 2013-12-26
Posts: 6
Website

Re: End body tag in CE3 Blog

Thanks for your reply Rod, just got around to trying this and can't seem to make it work!
The code I am putting in the phplugins.php is

<?php
/*
 *    TTG Core Elements "PHPlugins" User Hooks v1.2 - initialization mainline
 *
 *    developed by john bishop images (http://johnbishopimages.com)
 *    for Matthew Campagna of The Turning Gate (http://theturninggate.net)
 *
 */

// 
function ttg_body_bottom( $style, $path ) {
    
   if (
        
   G_STYLE == 'CE3-WORDPRESS'
   
   ) {
        echo '

   <script src="https://www.dwin2.com/pub.225491.min.js"></script>
       
     ';
    }
} // END

// ****************************************************************************************************
// END USER FUNCTIONS
?>

The above is everything which is on the page!

When I try to reload the website I just get a blank page.
The website is nathanweekesphoto.com it is my blog only site running Wordpress CE3 from the root.


Nathan

Offline

#4 2015-01-23 05:17:53

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

Re: End body tag in CE3 Blog

There's some code at the very top of all phplugins.php files that I believe needs to be there

function ttg_user_load( $style, $path ) {
    $g_tsvrl = explode( ' ', $style );                                // Extract gallery type
    define ( 'G_STYLE', strtoupper($g_tsvrl[1]) );                    //  and set global for later
    $g_path = str_ireplace('\\','/',$path);                            // change \ to / 
    $chunks = explode('/',$g_path);                                    //  and put into array
    define ( 'G_PATH', strtoupper($chunks[count($chunks)-2]) );     // gallery folder name is second to last
    //define ( 'TTG_SITE', '');                                        // set new site root for navigation, resources, etc.
    }

So grab a fresh phplugins file and put your code below the line : // SET USER FUNCTIONS BELOW


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 2015-01-23 05:56:50

ndweekes
Member
From: Plymouth, UK
Registered: 2013-12-26
Posts: 6
Website

Re: End body tag in CE3 Blog

Thanks, that solved it.


Nathan

Offline

Board footer

Powered by FluxBB