• Resolved j.johnston

    (@jjohnston-1)


    Hi Sayontan,

    In Picasa settings, the “Always use the photo description / caption, even if blank” option does not work for me. The photo description / caption is being displayed if there is one, and if there isn’t one then the file name is being displayed. In this case the field should be left blank.

    Thank you!

    WordPress 4.6.1 running Pictorico theme.
    Running PHP version: 5.6.28
    Photonic Gallery 1.62

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    I don’t see any such issue. See here: http://aquoid.com/news/plugins/photonic/picasa/picasa-albums/. Search for Maui – there are 3 photos, only the first of which has a description, which shows up, and the other two are blank.

    Thread Starter j.johnston

    (@jjohnston-1)

    Ah interesting, the problem occurs when I set Generic Options > Layouts > Image Layout to “Square thumbnail grid, lightbox”.

    When I set it to “Random tiles gallery, lightbox”, the problem goes away.

    By the way, I’m using the “Lightgallery” library.

    Plugin Author Sayontan Sinha

    (@sayontan)

    Tried that as well – it seems to work fine. Please take a look at the same demo page, where I have changed that particular album to display with square thumbnails. Are you sure you don’t have something else at play here?

    Thread Starter j.johnston

    (@jjohnston-1)

    Yes, I see that your example is working. I’ll have to keep trying to narrow it down. Thanks for checking.

    Thread Starter j.johnston

    (@jjohnston-1)

    Additional information:

    If I set the “Photo titles and caption” option to “No title / caption / description”, then the filename is always being displayed, instead of always being left blank.

    I’m still trying to narrow down the issue…

    Thread Starter j.johnston

    (@jjohnston-1)

    Ah… your Maui example uses Swipebox, and if I switch my test page to use Swipebox as well, the issue goes away. Only the captioned files display descriptive text, otherwise they are displayed as blank, as the setting dictates. I would use Swipebox for my site, but it has no Download option.

    If you switch your example to use Lightgallery, you may see the issue I’m referring to.

    Plugin Author Sayontan Sinha

    (@sayontan)

    OK – I had been working under the assumption that you were referring to the thumbnail title, which always renders correctly, regardless of which lightbox you are using. It should, because all the markup is generated in the back-end, and whether a title is used or a caption is not impacted by the lightbox you are using.

    But I now understand that you are talking about the title displayed in the lightbox. Here, unfortunately, Lightgallery’s implementation is a bit too customized. It looks at the a tag’s data-sub-html, then the a tag’s title, then the img tag’s alt attribute. Apparently if one is blank (i.e. data-sub-html="") it treats the attribute as missing (i.e. no data-sub-html at all), and it tries to look at the next thing in the pecking order. This is unlike how libraries are generally implemented. In this case, the a tag has both values blank, but the img tag has an alt with the file name.

    Anyway, the simplest way to bypass this is to look at photonic.js and locate this code:

    var $lightbox = current.lightGallery({
    	selector: (selfSelect == undefined || !selfSelect) ? 'a[rel="' + rel + '"]' : 'this',
    	counter: selfSelect == undefined || !selfSelect,
    	pause: Photonic_JS.slideshow_interval
    });

    And change it to this:

    var $lightbox = current.lightGallery({
    	selector: (selfSelect == undefined || !selfSelect) ? 'a[rel="' + rel + '"]' : 'this',
    	counter: selfSelect == undefined || !selfSelect,
    	pause: Photonic_JS.slideshow_interval,
    	getCaptionFromTitleOrAlt: false
    });

    I will put it in the plugin core.

    Thread Starter j.johnston

    (@jjohnston-1)

    I’ll try that out, and my apologies for not being clear in my description.
    Thank you very much!

    Thread Starter j.johnston

    (@jjohnston-1)

    I just updated photonic.js and it works perfectly 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Picasa photo description/caption displays filename instead of being left blank’ is closed to new replies.