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-09-27 04:15:27

mikewren
Member
Registered: 2016-09-09
Posts: 13

Formatting of Metadata (markdown?) on Single Image Pages?

Three years and a major revision of Backlight, I'll make this feature request again:

I'm looking to add some cleanly formatted metadata output under an image on single-image pages (not photoswipe).
A quick search of the forums suggests older versions of CE don't support metadata line breaks either via HTML or a special token/tag.
Has any progress been made with support for linebreaks in Backlight?

It would be super useful to be able to enable simple linebreaks to help group similar metadata together - even better would be to allow markdown in a multiline textbox.

My ideal layout would be:

{Filename}
========
{Caption}
------------
Keywords: __{Keywords}__
Captured: {D3} at {T1} by {Creator}
Location: {Location}, {City}, {State}
Negative Number: {Headline}
Photo Release Status: {ReleaseStatus}


Thank you for a tremendous product. It's been transformative in how I work every day with clients and co-workers. The inability to generate cleaner formatting of metadata on single-image pages is my only real gripe in an otherwise seamless integration between Lightroom and web galleries.

Offline

#2 2019-09-27 11:29:01

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Formatting of Metadata (markdown?) on Single Image Pages?

Not having tried it, I feel like this should now be possible using PHPlugins. In the backlight/custom/phplugins/phplugins-pangolin-sample.php file, have a look at the two examples labeled:

Create a custom image loop for albums
Display photo information on single-image pages

These should give you some idea how to put content on the single image pages, and how to reference metadata.

I feel like Ben might have explained previously how to hack additional metadata into what's exported ... Rod, do you know what I'm talking about? Any idea where to find that?


Matt

The Turning Gate, http://theturninggate.net

Offline

#3 2019-09-27 11:46:09

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

Re: Formatting of Metadata (markdown?) on Single Image Pages?

sounds familiar, but I don't know where to find it off the top of my head


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

Offline

#4 2019-09-27 13:50:53

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

Re: Formatting of Metadata (markdown?) on Single Image Pages?

With backlight 2, this is now possible: https://danielleu.com/galleries/_recent … single.php

I have a very rough example on my lab site: https://lab.danielleu.com/blog/customiz … page-view/

Due to the number of metadata you want to include, most likely you have to put them all together in one or two metadata fields with a custom separator: metadata = {Keywords}|{D3}|{T1}|{Creator}|{Location}|{City}|{State}|{Headline}|{ReleaseStatus}. This assumes that you don't use '|' in any of your fields.

Then in phplugins, you split them up again and then create the output you desire. Please keep me posted on your implementation. I'm curious with what you come up with!


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

Offline

#5 2019-09-30 01:02:56

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

Re: Formatting of Metadata (markdown?) on Single Image Pages?

Matthew wrote:

Not having tried it, I feel like this should now be possible using PHPlugins. In the backlight/custom/phplugins/phplugins-pangolin-sample.php file, have a look at the two examples labeled:

Create a custom image loop for albums
Display photo information on single-image pages

These should give you some idea how to put content on the single image pages, and how to reference metadata.

I feel like Ben might have explained previously how to hack additional metadata into what's exported ... Rod, do you know what I'm talking about? Any idea where to find that?

Matt, you might be referring to your own post where you did this with Javascript. See at the end of http://community.theturninggate.net/vie … 673#p60673


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

Offline

#6 2019-09-30 03:38:49

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

Re: Formatting of Metadata (markdown?) on Single Image Pages?

Here is an example implementation using a formatted token-metadata string with the necessary decoding done in phplugins: http://lab.danielleu.com/blog/better-us … age-pages/


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

Offline

#7 2019-09-30 04:04:45

kolohe280
Member
From: Talent, Oregon
Registered: 2017-08-23
Posts: 53

Re: Formatting of Metadata (markdown?) on Single Image Pages?

Daniel,

Thanks for posting that excellent example of something I've wanted to do with Backlight for a while (and might at some point get around to actually doing smile).

It does show one of my frustrations with trying to write customizations like this.  In your code, you make a call to the getMetadata function.  I have been trying to figure out for a long time how I would know what functions like this are available to me.  As much as I hate to use the "d word", is this stuff documented anywhere?  I'm not adverse to the idea of looking at the Backlight code, but I can't figure out where to look!

Thanks,

Paul

Offline

#8 2019-09-30 04:23:32

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

Re: Formatting of Metadata (markdown?) on Single Image Pages?

kolohe280 wrote:

Daniel,

Thanks for posting that excellent example of something I've wanted to do with Backlight for a while (and might at some point get around to actually doing smile).

It does show one of my frustrations with trying to write customizations like this.  In your code, you make a call to the getMetadata function.  I have been trying to figure out for a long time how I would know what functions like this are available to me.  As much as I hate to use the "d word", is this stuff documented anywhere?  I'm not adverse to the idea of looking at the Backlight code, but I can't figure out where to look!

Thanks,

Paul

Hi Paul,

A getMetadata() example can be found in the phplugins-pangolin-sample.php file that is part of the Backlight installer. Although, you might need to download the latest release to have it. To get an idea about possible options, I just searched (or grepped) through /backlight/modules to see how the function is used. Obviously, since this is undocumented, it might change down the road. Most likely, this might only happen when there is a major release update.

Then there is always the option to ask Ben in the forum.

Best


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

Offline

#9 2019-10-09 14:28:34

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Formatting of Metadata (markdown?) on Single Image Pages?

I lost track of this thread, sorry. Thanks, Daniel!


Matt

The Turning Gate, http://theturninggate.net

Offline

Board footer

Powered by FluxBB