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 2019-04-04 12:43:15

johncellsworth
Member
Registered: 2014-06-17
Posts: 22

link in photo caption

How can I embed links in the captions of photo images uploaded to Backlight 2 via Lightroom?
I want a "Click to purchase" opportunity that will take a viewer to the image in my Fine Art America site.
Thank you. Here's my site http://johnellsworth.com

Offline

#2 2019-04-04 13:27:34

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

Re: link in photo caption

That’s not possible. Captions cannot contain html.

However, you can assign specific pricing schemes to images in a cart enabled album by using the Mixed Pricing option in the cart add-on.
https://ttg-tips-and-tricks.barbeephoto … ht-albums/


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 2019-04-04 21:49:28

johncellsworth
Member
Registered: 2014-06-17
Posts: 22

Re: link in photo caption

I was afraid that was the case. Is that the doings of TTG or LR? Or simply universal coding?
The "cart enabled" album is redundant for me. I already have prices and options set up at Fine Art America. I'd like to send customers directly to a corresponding image and options on their pages. Is there any album compatible with TTG Backlight whereby I can enter text and links alongside a displayed photo. Thanks, Rod.

Offline

#4 2019-04-04 23:00:27

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

Re: link in photo caption

this has come up a number of times and Matt explained it once but I don’t recall the reason it can’t work.
The same restriction would apply to any album using image metadata to display information.

There are other options, depending on what you want things to look like and how much html you want to write.


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 2019-04-04 23:25:49

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

Re: link in photo caption

johncellsworth wrote:

I'd like to send customers directly to a corresponding image and options on their pages. Is there any album compatible with TTG Backlight whereby I can enter text and links alongside a displayed photo. Thanks, Rod.

Actually, if you're displaying one photo at a time, you could use Theater's Still Image presentation. Put one image in the album, and in the album copy enter the html to link to the corresponding picture in the Fine Art America album.


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

Offline

#6 2019-04-05 00:55:27

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: link in photo caption

Or you could use single image display and add your custom button/link using phplugins.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#7 2019-04-05 02:10:06

johncellsworth
Member
Registered: 2014-06-17
Posts: 22

Re: link in photo caption

Thank you Dan and Rod. I will explore the Theater's Still Image presentation as well as phplugins. I appreciate it.

Offline

#8 2019-04-05 06:31:50

johncellsworth
Member
Registered: 2014-06-17
Posts: 22

Re: link in photo caption

Rod, I think I may use your suggestion for "featured" photos, or new works. Looks like it will be useful.

Dan, would you please point me in a direction to implement phplugins? I'd appreciate it. Thanks to you both.

Offline

#9 2019-04-05 06:47:07

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

Re: link in photo caption

there's a section in the documentation about using phplugins.
The hooks you'd use for the Single Image presentation would be single_top and single_bottom. You could add text with a link to the gallery page. However, it would get a little tricky to customize the text for the specific image shown; some additional php I imagine. Daniel would probably know.

Another option, if you're only featuring a few images, is to use the TTG Responsive grid to display images and captions inside of <figure> elements and using <figcaption> to hold the caption and link text.

Say you had four new featured images. You can set up a responsive grid with one row and four columns. Each "cell" would have a picture and caption.

I've done something similar on the home page of my test site at the bottom of the page: http://backlight-2-100.barbeephoto.com/

In this case I'm using three columns and the images themselves are the links. But you could easily make the caption the link.

Let me know if you're interested and I'll post some sample code.


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

Offline

#10 2019-04-05 07:30:53

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: link in photo caption

Hi John,

johncellsworth wrote:

Dan, would you please point me in a direction to implement phplugins? I'd appreciate it. Thanks to you both.

Here are two little functions that you can add to your phplugins file. First is a helper that translates urls into real links. Then there is the single_bottom() function that shows some image infos on single image pages. This function is what you want to modify so it provides the link and infos to your Fine Art America image page. As shown, you can provide the url to your sales site using metadata, caption, or you could derive it from the image filename.

Yep, the urls trick works only here on single image pages.

// Parses texts and replaces text links with real URLs. Used to display them in single-page view.
function to_url($text) {
    return preg_replace('@(http)?(s)?(://)?(([-\w]+\.)+([^\s]+)+[^,.\s])@', '<a href="http$2://$4">$1$2$3$4</a>', $text);
}

function single_bottom()
{
	if ($this->hasPhoto()) {
		echo '<p>';
		echo '<strong>Image Infos:</strong><br/>';
		echo 'Filename: '.$this->photo->getFilename().'<br/>';
		echo 'Dimensions: '.$this->photo->getPhotoWidth().'w x '.$this->photo->getPhotoHeight().'h<br/>';
		echo 'Title: '.$this->photo->getMetadata(Photo::$PHOTO_TITLE).'<br/>';
		echo 'Caption: '.to_url($this->photo->getMetadata(Photo::$PHOTO_CAPTION)).'<br/>';
		echo 'Metadata 1: '.to_url($this->photo->getMetadata("metadata_one")).'<br/>';
		echo 'Metadata 2: '.to_url($this->photo->getMetadata("metadata_two")).'<br/>';
		echo '</p>';
	}
	return true;
} 

Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#11 2019-04-05 07:44:30

johncellsworth
Member
Registered: 2014-06-17
Posts: 22

Re: link in photo caption

Thanks again, gentleman. I am grateful for your suggestions and assistance. I have to give all of this thought then fiddle around with it.

Offline

#12 2019-04-05 07:47:41

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: link in photo caption

johncellsworth wrote:

Thanks again, gentleman. I am grateful for your suggestions and assistance. I have to give all of this thought then fiddle around with it.

Yeah, the user experience is a bit different when using the single-page view as the gallery representation.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#13 2019-04-05 07:58:27

johncellsworth
Member
Registered: 2014-06-17
Posts: 22

Re: link in photo caption

Obviously, the user's experience is very important to me. What I think I will do is put a link in each album description to the corresponding collection at Fine Art America. I'm certain viewers would be able to navigate successfully once they were in the correct collection.

A single-page galley representation would not expedite finding images within a viewer's interest. I like the idea of collections.

Offline

#14 2019-04-05 08:23:07

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: link in photo caption

johncellsworth wrote:

A single-page galley representation would not expedite finding images within a viewer's interest. I like the idea of collections.

You still have the gallery view. When you click on an image, you go to the single-image view if this is what you have selected.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#15 2019-04-05 09:34:43

johncellsworth
Member
Registered: 2014-06-17
Posts: 22

Re: link in photo caption

Right. This is what I use now, the classic gallery view. And as you say, I click on a thumbnail and I get single view. As mentioned, I wanted a link to the corresponding FAA page for the "larger" image. So, are you saying that the phplugins will furnish an FAA link in each of the single views of the classic gallery? When you and Rod mentioned "single image," I was thinking along the lines of the theater single-image presentation whereby I need an album for each image. Sorry for my misunderstanding.

Offline

#16 2019-04-05 09:57:22

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: link in photo caption

This is the single-image view: https://johnellsworth.com/collections/a … single.php

In the album preferences, you can enable to go there directly from the album grid. This is what I meant with different user experience.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#17 2019-04-05 10:29:21

johncellsworth
Member
Registered: 2014-06-17
Posts: 22

Re: link in photo caption

Oh, OK. Now I understand. I was not aware of this configuration. That could work for me. I will give it a go over the next week or so to see if I can configure it. Thanks for having stayed with me on this, Dan.

Offline

Board footer

Powered by FluxBB