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.
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.
Offline
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.
Do you need to duplicate? Or did you just want to upgrade the site?
If upgrading, just follow the upgrade instructions.
https://backlight.me/docs/upgrading
If duplicating, you can just download all the site files to your computer then upload them to a new sub-folder or sub-domain. Then log in and make the necessary URL changes in the settings. And then perform the update from BL1 to BL3
Keep in mind, if you're managing albums with Lightroom you'll only be able to control the existing albums and sets for one of the sites.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
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.
Last edited by bobby (2020-06-07 04:22:08)
Offline
You can control more than one site from Lightroom. It's just that each Publisher instance is unique.
So you can control the existing albums from the original site with the instance of Publisher that created them, but you can't control the duplicate site with the same instance.
OR
You can duplicate the site and change the API url in the instance of Lightroom that was controlling the original site so that it is now connected to the duplicate site.
This will control the duplicate site but cannot control the original site.
Also, you can have more than one instance of Publisher publishing to a site. Just keep in mind that the instance of Publisher can only control what it published.
On one of my sites I have an instance of publisher for regular albums and one for any client albums I create.
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.
What steps did you take?
Which site lost all pages? the original? the duplicate?
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
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
Offline
It should.
You can also export templates from one site and import then to another.
with copying over the data/ folder you'll bring over design templates, pages, albums, album sets, and site wide settings.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
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
?>
Offline
phplugins for BL2 have changed
see: http://community.theturninggate.net/vie … hp?id=8966
and the documentation: https://backlight.me/docs/using-phplugins
if you have specific issues with function, can you post those in the Backlight 3 Customization forum?
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline