Member
Member
kyrd   2022-04-26, 16:34
#1

Hello, after upgrading and changing theme I have many images that show 2 and/or 3 times in the slideshow. I don't know if it's something relate to ZP or to the theme zpBootstrap+ZenPage.

However, after some tests I've seen that it depends from the image description, where I have some html, i.e.:

Photo by author's name > author's website

I can say that is escaped as expected, but causes the image to be repeated 3 times (one x language, maybe?) in the slideshow only - pagination otherwise works correctly.
Moreover: in case I remove only the `` I get the photo duplicated 2 times instead of 3 times!

After removing html completely I get correctly the single image & the description appearing in the slideshow.
Of course I could cancel the html - but, hey! removing one by one :-P - if no other way to solve this, but also I'd really like to keep some links live in the description.

Member
Member
kyrd   2022-04-26, 16:38
#2

sorry, forgot to add a link where the above happens:
https://www.indirizzofantasma.net/autori/Hyuro/
there are 16 images, most with description, but if you open the slideshow you get 46 images!

Administrator
Administrator
fretzl   2022-04-27, 06:49
#3

I added "zpBootstrap" to the title of this topic so the theme author may spot this easier and can possibly help.

Administrator
Administrator
fretzl   2022-04-27, 07:20
#4

It must be something in your theme and/or FancyBox config. Official Zenphoto themes and slideshow display HTML descriptions just fine.

Administrator
Administrator
acrylian   2022-04-27, 09:23
#5

I am not familar with the theme and its settings. It seems to be that the fancybox triggers on three image urls (the image link, the thumb and a full image for the fancybox. Probably because of that three times the same instead of only one.

Check if there is any theme option for the fancybox to trigger on specific attributes onle. I see a link with data-fancybox="images" in the source it probably should trigger on only.

Member
Member
kyrd   2022-04-27, 11:32
#6

Thank you guys, I'll see what I can do.
Hopefully Vincent - the theme author - could have some other advice.

@acrylian - I'll follow the fancybox path that you suggest, but in this case why the fancybox should trigger 3 times only when `` is there? ... as now is too much for my understanding!

Administrator
Administrator
acrylian   2022-04-27, 11:55
#7

I have no idea either but there are at least two ``with an image: https://www.zenphoto.org/test/fancyboxissue.jpg.html Although one is not a direct image link…

Offhand I don't know fancybox's settings but if nothing is specificed theses "lightbox" all trigger on links to images. Thus my idea. The 3rd would be an `` but why that would trigger I don't know… Hopefully Vincent will have any idea.

Administrator
Administrator
fretzl   2022-04-28, 08:30
#8

This works for me:
Find /js/zpBootstrap.js (or /js/zpB_fancybox_config.js) and add

$('.caption a.thumb').removeAttr('data-fancybox');

This only removes the FancyBox trigger (the data-fancybox="image" attribute) in your image description links.
It does not fix the extra links created by FancyBox.

Member
Member
kyrd   2022-04-28, 09:21
#9

Thanks a lot, I'm travelling now but I'll give it a try asap! :-)

Member
Member
kyrd   2022-05-04, 10:12
#10

After much struggling I've solved the duplicates issue - but not yet the unescaped caption + html

The problem is caused by an `` tag which wraps both the thumb and the description in inc_print_image_thumb.php.

Nothing wrong happens if there is no html in the title/description - as in most of Vincent's website - but when I have another `` tag in the description, of course some nesting problem occurs.

That's the original code, lines 28 to 35:

    if ($isImagePhoto) { ?>
Administrator
Administrator
acrylian   2022-05-04, 10:27
#11

The description certainly allows links and other HTML. Why the fancybox overlay triggers on those links as well is certainly a matter of the theme's configuration for it.

Regarding lines lines 28 to 35 of the theme. It is valid in HTML5 to enclose all sorts of HTML with a ``element, but not other links. Which is partly because it obviously creates a problem which link is meant if you click the one within since everything is already a link. Not sure why the theme does it that way. Vincent could probably answer but seems a bit inactive here these days sadly (his own site is even still on ZP 1.5.6).

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.