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.
You are not logged in.
Pages: 1
OK... what I have done wasn't based on deep knowledge... but it works, thank you @Matt and @Rod.
My initial mistake was not to realize, that I had overpasted the new phplugins-pangolin-sample.php,
because I had copied and pasted the folders "custom" and "data" completely from the BL1 site.
Is there anything else in these 2 folders, that should be used from Backlight3 ?
(excluding my design from BL 1... that I have happily transferred)
So far I am happy that I managed to jump from BL1 to BL3
Years ago I luckily recieved this Plugin - unfortunatly I don`t know PHP
This phplugin works with BL1 but not BL3
It enables the selected menu-item to hold its color as long pages in that menu are selected.
On BL1 this PHPlugin works perfectly as can be seen here:
http://www.beautybobby.de/nature/
On BL3 the same PHPlugin does not work as can be seen here:
http://www.bobbyboe.com/nature/
Can anybody help me? What needs to be changed in the code?
<?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_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.
}
/*
*
* *************************************************************************************
* * *
* * Warning! When using echo or print special care must be qiven to using quotes. *
* * *
* * Strings inside single quotes must contain only double quotes *
* * or all single quotes must be escaped (ie \') or vice-versa *
* * *
* *************************************************************************************
*
* Fourteen user exits are defined in all web engines - all are optional
* (i.e. ttg_user_load.php may be the only processing)
*
* Some web engines will have additional exits defined, specific to that gallery type
*
* Each is called with the same parameters:
* %1 - TTG gallery-style gallery-release
* 3 blank delimited values
* - %1.1 - 'TTG'
* - %1.2 - string describing gallery type; no embedded blanks
* - %1.3 - a series of two to three period delimited integers
* describing gallery release level; x.y or x.y.z
* %2 - server filesystem file name and path of calling file
*
*
* Defined exits:
*
* ttg_user_load
* - return value ignored
* - called immediately after this file returns
* - called before any output is produced
* - all header and response variables are accessible
* - cookie and session processing can be initialized
* - globals to be used by later hook calls can be defined
*
* ttg_head
* - return value ignored
* - called immediately before </head>
* - encompasses nothing; use to insert content into the <head>
*
* ttg_header_top
* - if return=false, the contents of the normal Backlight header are skipped
* - called immediately within the header section
* - encompasses the full contents of the header section; can be used to replace those contents
*
* ttg_header_bottom
* - return value ignored
* - called last in the header section
* - encompasses nothing; use to insert content at the end of the header section
*
* ttg_masthead_top
* - if return=false, normal Backlight masthead is skipped
* - called immediately before the masthead element
* - fully encompasses the masthead; can be used to replace it
*
* ttg_masthead_bottom
* - return value ignored
* - called immediately after the masthead
* - encompasses nothing; use to insert content after the masthead
*
* ttg_navigation
* - if return=false, normal Backlight navigation is skipped
* - navigation is separate from the header section, so not affected by the above ttg_header... hooks.
* - encompasses the navigation <ul> element; can be used to replace it
*
* ttg_footer_top
* - if return=false, the contents of the normal Backlight footer are skipped
* - called immediately within the footer section
* - encompasses the full contents of the footer section; can be used to replace those contents
*
* ttg_footer_bottom
* - return value ignored
* - called last in the footer section
* - encompasses nothing; use to insert content at the end of the footer section
*
* ttg_scripts
* - return value ignored
* - called immediately before </body>
* - encompasses nothing; use to insert content at the very bottom of the page
*
* ttg_main_top
* - return value ignored
* - called immediately within the main content column
* - encompasses nothing; use to insert content at the very top of the main content column
* - located outside the password protected area
*
* ttg_main_bottom
* - return value ignored
* - called immediately before closing the main content column
* - encompasses nothing; use to insert content at the very bottom of the main content column
* - located outside the password protected area
*
* ttg_copy_top
* - if return=false, normal copy is skipped
* - called immediately within the page copy area
* - encompasses the page copy; can be used to replace it
*
* ttg_copy_bottom
* - return value ignored
* - called immediately before closing the page copy area
* - encompasses nothing; use to insert content following the page copy
*
* ttg_single_top
* - if return=false, single image and content are skipped
* - called immediately above the single image display
* - encompasses the single image and related metadata; can be used to replace it
* - available only on single-image HTML pages for applicable album templates
*
* ttg_single_bottom
* - return value ignored
* - called after the single image display
* - encompasses nothing; use to insert content following the single image display
* - available only on single-image HTML pages for applicable album templates
*
* ttg_tray01_top
* - if return=false, tray content is skipped
* - called within tray01, after masthead and navigation
* - encompasses the tray01 content area
*
* ttg_tray01_bottom
* - return value ignored
* - called after the tray01 content
* - encompasses nothing; use to insert content at the end of tray01
*
* ttg_tray02_top
* - if return=false, tray content is skipped
* - called within tray02, after masthead and navigation
* - encompasses the tray02 content area
*
* ttg_tray02_bottom
* - return value ignored
* - called after the tray02 content
* - encompasses nothing; use to insert content at the end of tray02
*
* ttg_gallery_top
* - if return=false, normal copy is skipped
* - called immediately within the media area
* - encompasses the gallery grid / slideshow; can be used to replace it
*
* ttg_gallery_bottom
* - return value ignored
* - called immediately before closing the media area
* - encompasses nothing; use to insert content following the gallery grid / slideshow
*
*/
// SET USER FUNCTIONS BELOW
// Some example functions are included below. Feel free to delete or modify unwanted functions.
// ****************************************************************************************************
/* DELETE THIS LINE
function _HOOK_( $style, $path ) {
echo '
';
return false;
} // END
DELETE THIS LINE */
/* DELETE THIS LINE
function ttg_main_top( $style, $path ) {
echo '<ul style="background-color:#FFF9C4;color:#000;margin:1.5rem 0;padding:24px 36px;">';
if (PASSWORD_ENABLED) {
echo '<li><strong>This gallery is private</strong>.</li>';
if (LOGGED_IN) {
echo '<li><small>The user is logged in</small>.</li>';
} else {
echo '<li><small>The user is logged out</small>.</li>';
}
} else {
echo '<li><strong>This gallery is public</strong>.</li>';
}
echo '</ul>';
return false;
} // END
DELETE THIS LINE */
/* DELETE THIS LINE
function ttg_navigation( $style, $path ) {
echo '
<ul class="primary-menu menu">
<li class="menu-item"><a href="/">Home</a></li>
<li class="menu-item menu-item-has-children"><a href="/galleries">Galleries</a>
<ul class="sub-menu">
<li class="menu-item"><a href="">Sub-item 1</a></li>
<li class="menu-item"><a href="">Sub-item 2</a></li>
</ul>
</li>
<li class="menu-item"><a href="/about">About</a></li>
<li class="menu-item"><a href="/contact">Contact</a></li>
</ul>
';
return false;
} // END
DELETE THIS LINE */
function ttg_scripts( $style, $path ) {
echo <<<SCRIPT
<script>
$(function() {
$("ul.menu a[href='" + window.location.pathname + "']").addClass("selected");
});
$("ul.menu a[href='" + window.location.pathname + "']").addClass("selected").parents('li').children().addClass('selected');
</script>
SCRIPT;
} // END
// ****************************************************************************************************
// END USER FUNCTIONS
?>
Thank you Rod, that worked so far.
Only the phplugin that I had recieved from Ben in 2017 for BL1 doesn`t work anymore.
This is the phplugin (that works with BL1 but not BL3):
<?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_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.
}
/*
*
* *************************************************************************************
* * *
* * Warning! When using echo or print special care must be qiven to using quotes. *
* * *
* * Strings inside single quotes must contain only double quotes *
* * or all single quotes must be escaped (ie \') or vice-versa *
* * *
* *************************************************************************************
*
* Fourteen user exits are defined in all web engines - all are optional
* (i.e. ttg_user_load.php may be the only processing)
*
* Some web engines will have additional exits defined, specific to that gallery type
*
* Each is called with the same parameters:
* %1 - TTG gallery-style gallery-release
* 3 blank delimited values
* - %1.1 - 'TTG'
* - %1.2 - string describing gallery type; no embedded blanks
* - %1.3 - a series of two to three period delimited integers
* describing gallery release level; x.y or x.y.z
* %2 - server filesystem file name and path of calling file
*
*
* Defined exits:
*
* ttg_user_load
* - return value ignored
* - called immediately after this file returns
* - called before any output is produced
* - all header and response variables are accessible
* - cookie and session processing can be initialized
* - globals to be used by later hook calls can be defined
*
* ttg_head
* - return value ignored
* - called immediately before </head>
* - encompasses nothing; use to insert content into the <head>
*
* ttg_header_top
* - if return=false, the contents of the normal Backlight header are skipped
* - called immediately within the header section
* - encompasses the full contents of the header section; can be used to replace those contents
*
* ttg_header_bottom
* - return value ignored
* - called last in the header section
* - encompasses nothing; use to insert content at the end of the header section
*
* ttg_masthead_top
* - if return=false, normal Backlight masthead is skipped
* - called immediately before the masthead element
* - fully encompasses the masthead; can be used to replace it
*
* ttg_masthead_bottom
* - return value ignored
* - called immediately after the masthead
* - encompasses nothing; use to insert content after the masthead
*
* ttg_navigation
* - if return=false, normal Backlight navigation is skipped
* - navigation is separate from the header section, so not affected by the above ttg_header... hooks.
* - encompasses the navigation <ul> element; can be used to replace it
*
* ttg_footer_top
* - if return=false, the contents of the normal Backlight footer are skipped
* - called immediately within the footer section
* - encompasses the full contents of the footer section; can be used to replace those contents
*
* ttg_footer_bottom
* - return value ignored
* - called last in the footer section
* - encompasses nothing; use to insert content at the end of the footer section
*
* ttg_scripts
* - return value ignored
* - called immediately before </body>
* - encompasses nothing; use to insert content at the very bottom of the page
*
* ttg_main_top
* - return value ignored
* - called immediately within the main content column
* - encompasses nothing; use to insert content at the very top of the main content column
* - located outside the password protected area
*
* ttg_main_bottom
* - return value ignored
* - called immediately before closing the main content column
* - encompasses nothing; use to insert content at the very bottom of the main content column
* - located outside the password protected area
*
* ttg_copy_top
* - if return=false, normal copy is skipped
* - called immediately within the page copy area
* - encompasses the page copy; can be used to replace it
*
* ttg_copy_bottom
* - return value ignored
* - called immediately before closing the page copy area
* - encompasses nothing; use to insert content following the page copy
*
* ttg_single_top
* - if return=false, single image and content are skipped
* - called immediately above the single image display
* - encompasses the single image and related metadata; can be used to replace it
* - available only on single-image HTML pages for applicable album templates
*
* ttg_single_bottom
* - return value ignored
* - called after the single image display
* - encompasses nothing; use to insert content following the single image display
* - available only on single-image HTML pages for applicable album templates
*
* ttg_tray01_top
* - if return=false, tray content is skipped
* - called within tray01, after masthead and navigation
* - encompasses the tray01 content area
*
* ttg_tray01_bottom
* - return value ignored
* - called after the tray01 content
* - encompasses nothing; use to insert content at the end of tray01
*
* ttg_tray02_top
* - if return=false, tray content is skipped
* - called within tray02, after masthead and navigation
* - encompasses the tray02 content area
*
* ttg_tray02_bottom
* - return value ignored
* - called after the tray02 content
* - encompasses nothing; use to insert content at the end of tray02
*
* ttg_gallery_top
* - if return=false, normal copy is skipped
* - called immediately within the media area
* - encompasses the gallery grid / slideshow; can be used to replace it
*
* ttg_gallery_bottom
* - return value ignored
* - called immediately before closing the media area
* - encompasses nothing; use to insert content following the gallery grid / slideshow
*
*/
// SET USER FUNCTIONS BELOW
// Some example functions are included below. Feel free to delete or modify unwanted functions.
// ****************************************************************************************************
/* DELETE THIS LINE
function _HOOK_( $style, $path ) {
echo '
';
return false;
} // END
DELETE THIS LINE */
/* DELETE THIS LINE
function ttg_main_top( $style, $path ) {
echo '<ul style="background-color:#FFF9C4;color:#000;margin:1.5rem 0;padding:24px 36px;">';
if (PASSWORD_ENABLED) {
echo '<li><strong>This gallery is private</strong>.</li>';
if (LOGGED_IN) {
echo '<li><small>The user is logged in</small>.</li>';
} else {
echo '<li><small>The user is logged out</small>.</li>';
}
} else {
echo '<li><strong>This gallery is public</strong>.</li>';
}
echo '</ul>';
return false;
} // END
DELETE THIS LINE */
/* DELETE THIS LINE
function ttg_navigation( $style, $path ) {
echo '
<ul class="primary-menu menu">
<li class="menu-item"><a href="/">Home</a></li>
<li class="menu-item menu-item-has-children"><a href="/galleries">Galleries</a>
<ul class="sub-menu">
<li class="menu-item"><a href="">Sub-item 1</a></li>
<li class="menu-item"><a href="">Sub-item 2</a></li>
</ul>
</li>
<li class="menu-item"><a href="/about">About</a></li>
<li class="menu-item"><a href="/contact">Contact</a></li>
</ul>
';
return false;
} // END
DELETE THIS LINE */
function ttg_scripts( $style, $path ) {
echo <<<SCRIPT
<script>
$(function() {
$("ul.menu a[href='" + window.location.pathname + "']").addClass("selected");
});
$("ul.menu a[href='" + window.location.pathname + "']").addClass("selected").parents('li').children().addClass('selected');
</script>
SCRIPT;
} // END
// ****************************************************************************************************
// END USER FUNCTIONS
?>
Ah... I understand a little more now, thank you. Yes I have already created more publisher in Lightroom... I dont need one going to 2 sites.
The BL3 Site was empty - standard when I updated.
following the information of your link I will no substitute backlight/custom and backlight/data... If I understand right, this should bring my custom design from the BL1 site to the new BL3-site
Well... I wanted to duplicate because I did`t want to risc loosing a perfect site.
So I duplicated all files... uddated to BL3... but after this the site has lost all pages, settings and templates.
following the information of your link I will no substitute backlight/custom and backlight/data... If I understand right, this should bring my custom design to the new BL3-site
Actually the fact of a limit of only one domaine controllable from Lightroom was new for me... if this is really like this, this is very bad for me.
I would like to duplicate a website which was build with Backlight-1 to the new Backlight-3
Is there a way to copy certain files from folder site1 to folder site2?
Pages are made from pangolin templates.
Pages: 1