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.

#51 Re: Backlight 3 Customization » Getting Started with new JSON API » 2020-05-07 21:46:19

You have an idea and are not certain, why don't just try it? Worst Case it doesn't work and you remove the code ;-)

function footer_top() {
   $posts = $this->dlp_get_wp_rest_response("https://yoursite.domain/backlight/api/get_album/12345");
   echo "Array length: " . count($posts['album']['photos']);
}

I hope I didn't made any typos ;-)

#52 Re: Backlight 3 Customization » Getting Started with new JSON API » 2020-05-07 10:00:57

I wrote up a small example for you, Nicolas. This is plain php and you can use it in your phplugins file. Just use the example code where you like to have the count, such as inside the footer. Have fun!

http://lab.danielleu.com/blog/using-bac … -from-php/

#53 Re: Backlight Support » Need some help » 2020-05-07 06:10:17

You need to make new Album Templates using the Pangolin Page Templates

Remember, the Page Templates that are used by Album and Album Set Templates. Album and Album Set Templates is what you select in Lightroom.

#54 Re: Backlight 3 Customization » Getting Started with new JSON API » 2020-05-07 02:41:56

The error is because you introduce a syntax error. The single quotes are there to terminate the string that started after the echo statement.

Using double quotes should do the trick:

backlight.getAlbum("12345", {...

#57 Re: Backlight 3 Support » ?Is there a way to have the Copyright message in the footer be a link » 2020-05-06 07:20:52

rod barbee wrote:

Ah. html. Markdown doesn't work, but html does. That's too easy. wink

When in doubt, test....

That should be my new signature

Love this one!

#59 Re: Backlight 3 Support » Backlight 3 install OK but Lightroom Publish error » 2020-05-06 01:33:33

In this case, you'll need to ask your host's technical support to enable it.

#60 Re: Backlight 3 Support » Error after installing Wordpress » 2020-05-06 01:32:20

To post an image here in the forum, please see https://www.bbcode.org/examples/?id=10

This would look like this for you:
2020-05-04_15-07-28BL3_WPinstall%20error.jpg

It looks like you are using a single column layout for your blog. Are you using any widgets? If you do, you might need to switch to a 2 column layout for your blog.

#62 Re: Backlight 3 Support » GDPR Notice & Acceptance Notice » 2020-05-05 16:08:02

You can do this with phplugins using the head function.

A very long time ago, I wrote this before Backlight added support for the cookie message:

function head( ) {
echo '
<script src="/backlight/custom/js/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function(){
window.cookieconsent.initialise({
  "palette": {
    "popup": {
      "background": "#efefef",
      "text": "#404040"
    },
    "button": {
      "background": "#ffffff",
      "text": "#ff0000"
    }
  },
  "theme": "edgeless",
  "content": {
    "message": "By continuing to use the site, you agree to the use of cookies. You can find out more by following this ",
    "dismiss": "OK",
    "link": "link",
    "href": "/cookie_policy.php"
  }
})});
</script>';		
}

This shows you how you can add your script.

#63 Re: Backlight 3 Support » For me its a struggle » 2020-05-05 03:49:10

lofty wrote:

Well, This is embarrassing!

I have the same issue. Bought Backlight3. Clicked the Update link and site says it is still Backlight2. Tried the change email link as above and no deal. Link to screenshot below....

https://www.dropbox.com/s/rrlrd7djos7l1 … 1.jpg?dl=0

I think you used two different emails when you bought Backlight 2 and Backlight 3. If you have identified the two emails, contact Matt so he can update the system first.

#65 Re: Backlight 3 Support » error publishing photos to album » 2020-05-04 14:46:10

There is a newer version available. You can download it from Backlight > Admin > Backlight Modules page.

#66 Re: Backlight 3 Customization » Disable Single Image Pages » 2020-05-03 01:03:44

Single image pages are there, among others, for SEO. So I would discourage disabling them.

#67 Re: Backlight 2 Support » unable to log into Backlight » 2020-05-03 01:00:32

R42itus wrote:

What version of PHP should I have running on Bluehost?

I would try to select the oldest possible and check if you can log in and do the module upgrades. After the upgrade, select the newest one.

#69 Re: Backlight 2 Support » LR tokens generating a <br/> » 2020-04-30 03:57:37

How about just using

{Caption|Title}, {Copyright}

#70 Re: Backlight 2 Customization » Auto calculated image dimensions » 2020-04-29 05:49:41

Nico3939 wrote:

Thanks Rod, but it seems we can make a line break in LUA by using  "\n" or "\r"

But it don’t work or I forget something

I think this has to do with the internal processing of Lr, Backlight, and the display engine where line breaks can break the code.

#71 Re: Backlight 2 Customization » Auto calculated image dimensions » 2020-04-29 05:40:03

rod barbee wrote:

very cool Daniel. I got to learn something new today!!

Yeah, me too big_smile

#72 Re: Backlight 2 Customization » Auto calculated image dimensions » 2020-04-29 01:58:48

And this is with two decimal points:

Native dimensions: {CroppedWidth} x {CroppedHeight}px | {LUA= return string.format("%.2f",CroppedWidth/300*2.54)} x {LUA= return string.format("%.2f",CroppedHeight/300*2.54)} cm | {LUA= return string.format("%.2f",CroppedWidth/300)} x {LUA= return string.format("%.2f",CroppedHeight/300)} inches | 300dpi

#73 Re: Backlight 2 Customization » Auto calculated image dimensions » 2020-04-29 01:48:01

This turned out more challenging as expected, although the result looks rather straightforward wink

Native dimensions: {CroppedWidth} x {CroppedHeight}px | {LUA= return math.floor(CroppedWidth/300*2.54)} x {LUA= return math.floor(CroppedHeight/300*2.54)} cm | {LUA= return math.floor(CroppedWidth/300)} x {LUA= return math.floor(CroppedHeight/300)} inches | 300dpi

#74 Re: Backlight 2 Customization » Single Image Presentation View: Remove Right and Left Browse icons » 2020-04-17 09:51:46

Just be aware by using phplugins, you will spend more time maintaining your site. You have to verify many things that would work out of the box by sticking to the default implementation!

This is a simplified example of what I use on my site and is obviously based on existing backlight code:

function single_top( ){
	$photo = $this->photo;
	$album = $this->album;
	
	$back = $album->getIndexPageForPhoto($photo);

        $img_title = $photo->hasMetadata(Photo::$PHOTO_TITLE) ? $photo->getMetadata(Photo::$PHOTO_TITLE) : $photo->getFilename();
	$img_caption = $photo->hasMetadata(Photo::$PHOTO_CAPTION) ? $photo->getMetadata(Photo::$PHOTO_CAPTION) : '';
        $img_alt   = $photo->hasMetadata(Photo::$PHOTO_CAPTION) ? $photo->getMetadata(Photo::$PHOTO_CAPTION) : $img_title;
	
	$ph_id = $photo->getItemNumber();
	$ph_path = $photo->getUrl('photos');
	$ph_w = $photo->getPhotoWidth();
	$ph_h = $photo->getPhotoHeight();
	
	echo '<h1>'. $img_title .'</h1>';
	
	// Top Bar
	echo '<ul class="single_icons" style="max-width:' .$ph_w.'px;">'; 

	if ($back) echo '<li class="single_image_back"><a href="'.$back.'"><span>Album</span></a></li>';

	echo '<li><button class="add-to-cart" data-item="'.$photo->getItemNumber().'" data-name="'.$photo->getItemName().'" data-price="'.$photo->getMetadata("itemPricing").'" data-thumbnail="'.$photo->getURL("thumbnails-for-mobile").'"></button></li>';	
	?>
				
	</ul>

	<figure id="fig-<?php echo $ph_id?>" class="single_image" itemscope itemtype="http://schema.org/ImageObject" style="max-width:<?php echo $ph_w;?>px;">
		<img src="<?php echo $ph_path?>" id="photo-<?php echo $ph_id?>" height="<?php echo $ph_h?>" width="<?php echo $ph_w ?>" style="width: <?php echo $ph_w?>px;" alt="<?php echo $img_alt?>" />
		<figcaption"><?php echo $img_caption?></figcaption>
	</figure>

	<?php

	return false;	
}

But note that this code doesn't support the backlight 'alt image' option or language customizations.

#75 Re: Backlight 2 Customization » Single Image Presentation View: Remove Right and Left Browse icons » 2020-04-17 06:38:11

Yes, the css needs more specificity:

ul.single_icons .single_image_next,
ul.single_icons .single_image_prev
 {
    display: none;
}

But if one clicks on the image, then you advance to the next image anyway. The solution for that would be phplugins where you replace the image content. I think you know now how to do this ;-)

Board footer

Powered by FluxBB