Oh now I see that this is an incomplete plugin of the original https://github.com/fancyapps/fancybox – but still my questions remain: could such a plugin work with links from that book? Or do I need to manually edit some JS for it to work?
Oh now I see that this is an incomplete plugin of the original https://github.com/fancyapps/fancybox – but still my questions remain: could such a plugin work with links from that book? Or do I need to manually edit some JS for it to work?
Plugin Author
w3dev
(@w3dev)
Hi @tiotrom, The plugin is designed to programatically find a replace links to images with code that enables fancybox, and the same to WordPress Gallery code.
You are correct, adding “data-fancybox” to links that point to other filetypes such as PDF, or inline code by using “data-src=…” will also work.
-
This reply was modified 7 years ago by
w3dev.
Plugin Author
w3dev
(@w3dev)
With regard to your website specifically, I’ll have to verify, but I think the plugin might not be picking up on your image link due to its extension being “jpeg” instead of “jpg”.
I changed to jpg but still not working https://www.tromsite.com/2018/03/test/
Plugin Author
w3dev
(@w3dev)
It looks like you are using Easy Fancybox, a different plugin altogether.
Sorry about that. I am testing your plugin and that’s what we were talking about. I deactivated it for now since it does not work – I tested with jpg as well. And I reactivated my old Easy Fancybox plugin. Do you want me to leave the FancyBox 3 active for you to test?
Done. Let me know when I can restore the Easy Fancybox since we use that one a lot. But I love this one a lot more π so I really want to use it. Maybe you can figure it out why it does not work on this test page https://www.tromsite.com/2018/03/test/ – maybe is the way these links load? We are using this plugin https://codecanyon.net/item/dflip-flipbook-wordpress-plugin/16408847 to generate our books and we thought your plugin may work to allow us to open the links from the book inside a popup.
Plugin Author
w3dev
(@w3dev)
OK, I see the issue. Our code is designed to enable fancyBox functionality only on links to images that use a thumbnail image, and not for text links that point to images.
So this currently works:
<a href="(img)">(thumbnail)</a>
However this does not:
<a href="(img)">(text)</a>
I will fix the functionality asap, should be able to push an update out later today or tomorrow at the latest.
-
This reply was modified 7 years ago by
w3dev.
Ok. I added an image though https://www.tromsite.com/2018/03/test-tio/ and it still doesn’t work.Thought to let you know
Plugin Author
w3dev
(@w3dev)
Can you explain what’s going on here? When I look at the code, I don’t see an img, although there is an image displaying.
<a title="https://www.tromsite.com/wp-content/uploads/2018/01/language-tromsite.jpg" href="https://www.tromsite.com/wp-content/uploads/2018/01/language-tromsite.jpg" target="_blank" rel="noopener noreferrer nofollow"></a>
Ok, as I said, I use this plugin https://codecanyon.net/item/dflip-flipbook-wordpress-plugin/16408847 – it generates an online flipbook off a pdf file and converts it to html5. Maybe because it loads the pages dinamically your plugin cannot “inject” the proper class to the links? Because if you add it manually like so: <a data-fancybox title="https://www.tromsite.com/wp-content/uploads/2018/01/language-tromsite.jpg" href="https://www.tromsite.com/wp-content/uploads/2018/01/language-tromsite.jpg" target="_blank" rel="noopener noreferrer nofollow"></a>
it works perfectly. So if you add “data-fancybox” manually it works. But your plugin cannot do that automatically it seems?
Maybe if you fix the thing you said above with the <a href="(img)">(text)</a>
it will work?
Plugin Author
w3dev
(@w3dev)
I pushed an update today that adds support for text linking.