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-07-06 07:02:18

dsegar
Member
Registered: 2015-04-16
Posts: 22

Backlight 2 not able to access image more tha 2 metadata fields.

I had finally decided that Backlight 2 would be developed enough to migrate from my CE4 site and have been working on the implementation.  First, let me say that Backlight 2 is indeed fast and generally easy and flexible.  There are a few issues, especially the very poor documentation (e.g there is a setting for Bokeh SVG on or off but a search fopr Bokeh in either the documentation or forums for Bokeh returns nothing - not an issue for me but Backlight is supposed to be intuitive and many do not know what this is).  What is a BADLY needed is simple listing of all settings with a short explanation of what exactly they apply to - think the list of settings at the end of all camera manuals.

At present I have Backlight 2 designs functioning for my entire site.  There are still a few issues I am cleaning up but there are three that stand out.
1. I would like to replace the nav buttons on the single image page with css styled text buttons and have not yet found a way to fully implement this.  Not a deal breaker but annoying
2. On the album set  pages, there is a quirk that looks bad when a vertical image is the random image selected and dispayed from the album.  In CE4 equivalent this was easily and cleanly handled by the text flowing to fill the space left by the downsized image needed due to the height- width properties of the vertical image.  I can live with this but it looks like bad design so any ideas about how this can be addresses would be welcome.
3. Here is the absolute deal break or make issue for me.  My site is educational and completely depends on displaying several pieces of metadata information about each of the images shown.  Backlight fails utterly here.  First, there are only two metadata items allowed (other that image name and dimensions) - I need 5 or 6. Second, the metadata are not available in the single image template except in the very poor single line title field.  This tilte line defies styling that can make several pieces of information easily readable under the image.  CE4 suffered from these same issues but I was able to edit the php code in the template to access additional metadata items where my Lightroom stores relevant data items (mostly IPTC text fields).  There is no full textual php "template" in Backlight as there is in CE4. Thus developing php code to add metadata items and make them available for printing in a formatted div (as done in CE4), can apparently only be done by using a phpplugin code section, (which would probably be placed at singe_page_bottom hook location) but I am not a php expert and have not found a way to do this yet.  At this point I need to know if this is possible, and preferably get pointed to the right sample code snippets to base this on.  Otherwise, as I say, this is a deal breaker as I my time needs to be assigned to other things (authoring several textbooks) and there will be no way I can ever move fro CE4 to Backlight.  Any ides on how to approach a phpplugins fix that would allow multiple image metadata text fields to be fetched would be welcome.   This boils down to the whether it is possible to fetch multiple metadata fields and make them available for echo or print commands.   

Thanks in advance for any suggestions that you can make.

Offline

#2 2019-07-06 07:51:13

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Backlight 2 not able to access image more tha 2 metadata fields.

1. A combination of Javascript in PHPlugins should be able to achieve this.

2. Backlight 2 should provide the same or similar metadata options than CE4, and as you've suggested, PHPlugins is the way to go.  This is the supported approach to customising functionality.  There is no such thing as a free linch, so your options are to put a bit of effort to find the solution (with our help), or get yourself a bespoke solution. 

The file phplugins-pangolin-sample.php includes code examples for pulling out various data under the commented-out album_top function.
Can you provide an example of a CE4 gallery or single image page?  I can advise on what you'd put in a PHPlugins file.

Offline

#3 2019-07-06 08:11:38

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

Re: Backlight 2 not able to access image more tha 2 metadata fields.

dsegar wrote:

... there is a setting for Bokeh SVG on or off but a search for Bokeh in either the documentation or forums for Bokeh returns nothing - not an issue for me but Backlight is supposed to be intuitive and many do not know what this is ...

"Bokeh" is a standard photography term, and this particular thing is fairly easy to sort out by turning it on and then off again.

dsegar wrote:

What is a BADLY needed is simple listing of all settings with a short explanation of what exactly they apply to - think the list of settings at the end of all camera manuals.

Straight up, never going to happen. It's largely unnecessary, would not be kept up-to-date with changes, and would bloat documentation to the point of uselessness. The more documentation there is, the more difficult it becomes to find the thing one actually wants to find.

Where we feel the intent of options is unclear, we put descriptions and helper text in the UI.

Not to dismiss your point that better documentation would be great. It would be. But some things are realistic and would be genuinely useful, and some things are not realistic, and would only serve to clutter the docs. I think a breakdown of sliders falls squarely into the latter category. Realistically, we would not keep such a thing up-to-date; we would set it and forget it, and it would quickly fall behind the actual product.

dsegar wrote:

1. I would like to replace the nav buttons on the single image page with css styled text buttons and have not yet found a way to fully implement this.  Not a deal breaker but annoying.

Use custom CSS. See below.

dsegar wrote:

2. On the album set  pages, there is a quirk that looks bad when a vertical image is the random image selected and displayed from the album.  In CE4 equivalent this was easily and cleanly handled by the text flowing to fill the space left by the downsized image needed due to the height- width properties of the vertical image.  I can live with this but it looks like bad design so any ideas about how this can be addresses would be welcome.

We recently revisited the layout and thumbnail handling of the Descriptive album set layout. Make sure you're running the latest version.

The Descriptive layout in Backlight is fluid and responsive, and so not at all the same as in CE4, which relied on fixed pixel values for sizing. Both ways have inherent pros and cons. Despite visual similarities to CE4, though, they are in fact very different.


dsegar wrote:

3. Here is the absolute deal break or make issue for me.  My site is educational and completely depends on displaying several pieces of metadata information about each of the images shown.  Backlight fails utterly here.  First, there are only two metadata items allowed (other that image name and dimensions) - I need 5 or 6. Second, the metadata are not available in the single image template except in the very poor single line title field.  This tilte line defies styling that can make several pieces of information easily readable under the image.  CE4 suffered from these same issues but I was able to edit the php code in the template to access additional metadata items where my Lightroom stores relevant data items (mostly IPTC text fields).  There is no full textual php "template" in Backlight as there is in CE4. Thus developing php code to add metadata items and make them available for printing in a formatted div (as done in CE4), can apparently only be done by using a phpplugin code section, (which would probably be placed at singe_page_bottom hook location) but I am not a php expert and have not found a way to do this yet.  At this point I need to know if this is possible, and preferably get pointed to the right sample code snippets to base this on.  Otherwise, as I say, this is a deal breaker as I my time needs to be assigned to other things (authoring several textbooks) and there will be no way I can ever move fro CE4 to Backlight.  Any ides on how to approach a phpplugins fix that would allow multiple image metadata text fields to be fetched would be welcome. This boils down to the whether it is possible to fetch multiple metadata fields and make them available for echo or print commands.

Load everything in your caption, with some character between the items. For example:

{Title}%{Caption}

Then use jQuery to split on the chosen character -- in this example, % -- and reformat the metadata into a list:

function scripts() {
	// Target single-image pages
	if ($this->hasPhoto()) {

echo <<<SCRIPT
	<script>
		// Split and reformat metadata
		var photoInfo = $('.single_image figcaption').text().split('%')
		var metadataList = $('<ul />')
		$.each(photoInfo, function(i, item) {
			if (item.length > 0) {
				metadataList.append('<li>' + item + '</li>')
			}
		})
		$('.single_image figcaption').html(metadataList)
	</script>
SCRIPT;

	}
	return false;
} // END /**/

Add custom CSS to style your changes:

ul.single_icons .single_image_next a,
ul.single_icons .single_image_prev a {
	padding: 0 6px;
	width: auto;
}

.single_image_next a::after {
	content: "Next";
}

.single_image_prev a::after {
	content: "Previous";
}

.single_image figcaption ul {
	padding: 0;
}

.single_image figcaption ul li {
	list-style-type: none;
	padding: 0;
}

Matt

The Turning Gate, http://theturninggate.net

Offline

#4 2019-07-07 05:15:35

dsegar
Member
Registered: 2015-04-16
Posts: 22

Re: Backlight 2 not able to access image more tha 2 metadata fields.

Thanks, especially for the code sample.

As to your thoughts on documentation, I seek to disagree about what is possible.  What I am suggesting be produced is a single file with a listing of settings and what they do.  Producing that the first time would indeed take some time.  However, if properly designed it could both help users AND developers.  I absolutely KNOW this as I was Director and team manager for a large multi-coder organization that established exactly this sort of listing for all meteorological and environmental data for Alaska.  Data flowed in from many sources and coders formatted output modules for users, each coder contributing changes as data set characteristics changed over time.  A central database of code changes took a while to design and implement, but once it was a single data file, updated by each coder as changes were made was available to everyone to coordinate work flow.  Once such a database exists (yours would be orders of magnitude less complex that the Alaska one) a simple set of daily update routines plus a cron file web update could maintain the list for users with ZERO added effort.  Anyway, just a suggestion.

The album set page design issue I flagged was indeed using the most recent available version of the Descriptive design option.  I can send you an image that shows this. Just let me know how to send it.  This is not a big issue for me as I can live with the iconic design, which works well and will work better when I have time to manage caption length and add white space to even up the cells borders. 

Added: Her is the image.  It will be available online for a couple of weeks and then will auto-expire
album_set_screen.jpg

The metadata issue is the most important one.  I had already verified that the title tag for the single image could load all the metadata tags I need.  From your code suggestions I should be able to hide and parse the title tag and use the JQuery and css to produce the desired result.  I have month long travel scheduled and several onrushing deadlines so it will be a while before I get to this.  I will let you know if I run into other issues and send you a link so you can how the site looks (all 10,000 pages) looks once it is up and running.

Last edited by dsegar (2019-07-07 05:58:27)

Offline

#5 2019-07-07 10:51:43

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

Re: Backlight 2 not able to access image more tha 2 metadata fields.

Is there a link where I can see that Descriptive album set? That's not representative of what I've been seeing in my development environment.


Matt

The Turning Gate, http://theturninggate.net

Offline

#6 2019-07-08 00:50:50

dsegar
Member
Registered: 2015-04-16
Posts: 22

Re: Backlight 2 not able to access image more tha 2 metadata fields.

Unfortunately, no.  I am developing almost exclusively on a localhost setup.  I could set up a protected subdomain version but that would take time I do not have for the next six to eight weeks.  I did notice that, in the iconic setup (what I am developing on now) vertical images are cropped and displayed to fill the box settings allowed.  The full vertical image behavior shown is persistent in Descriptive mode even after a full replacement and update of the backlight 2  installation and when all my phplugins and css customizations are disabled.

Offline

#7 2019-10-14 01:30:24

dsegar
Member
Registered: 2015-04-16
Posts: 22

Re: Backlight 2 not able to access image more tha 2 metadata fields.

I finally got some time to work on this.  It all works now, although there is still an "I can live with it" issue with portrait format images in the album pages.  It is now fully implemented and drives my entire 13,000+ page web site.  You can see the result at https://www.reefimages.com

Offline

Board footer

Powered by FluxBB