Fancybox media viewer Fancybox media viewer
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Fancybox media viewer

Started by ron4mac, April 30, 2021, 01:36:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ron4mac

This plugin leverages the fancybox javascript library to provide an alternative full size viewing method for media (image/video).

It features zoom/pan, fullscreen, download, slideshow (albums) and right-click protect. It is touch-enabled, as well. Configure differently for each user group.

To be fully functional, it requires the newer version of jQuery (a javascript library) that comes with version 1.6.12 and later of CPG.

Versions prior to v1.4.0 function only when the CPG config option to go directly from thumbnails to the larger image is enabled. Version 1.4.0 and later does not have that restriction.

Update: v1.3 added ability to configure differently for each user group
Update: v1.3.2 made compatible with Lazy Load plugin
Update: v1.3.3 corrected unwanted auto-advance from video
Update: v1.3.4 use default display method for files not handed by FancyBox
Update: v1.3.6 added option to update view count for images
Update: v1.3.8 adds the capability to open image in an intermediate view (alt/option click thumbnail)
Update: v1.4.1 now functions in both gallery full image view modes (+bugfix for 1.4.0)
Update: v1.4.2 avoids keyboard slide navigation interference from other plugins
Update: v1.4.3 reduced possibility to interfere with other plugins


kodif

Throws error when clicked "Album list">"Last comments" when comments has smileys

QuoteFatal error: Uncaught Error: Call to undefined function process_smilies() in D:\Apache\htdocs\sites\galeria7\include\functions.inc.php:1183 Stack trace: #0 D:\Apache\htdocs\sites\galeria7\include\functions.inc.php(1525): build_caption(Array, Array) #1 D:\Apache\htdocs\sites\galeria7\plugins\fancybox\codebase.php(52): get_pic_data('lastcom', '2713', '<img src="image...') #2 D:\Apache\htdocs\sites\galeria7\include\plugin_api.inc.php(215): plg_fancybox_deploy('<!DOCTYPE html ...') #3 D:\Apache\htdocs\sites\galeria7\include\functions.inc.php(949): CPGPluginAPI::filter('gallery_header', '<!DOCTYPE html ...') #4 D:\Apache\htdocs\sites\galeria7\include\init.inc.php(442): load_template() #5 D:\Apache\htdocs\sites\galeria7\thumbnails.php(28): require_once('D:\\Apache\\htdoc...') #6 {main} thrown in D:\Apache\htdocs\sites\galeria7\include\functions.inc.php on line 1183

ron4mac

Thank you for your feedback.
See the updated version (1.1) above.

kodif

Yes, this is solved.

But..

Lets say that we have some users in our gallery.

On index page, we have "Last updated albums",  with thumbs and names of author.
After click on user name, we are redirected to his profile, where we can see
thumb "Last uploaded file. Click to see all uploads by ..."

After clicking, we are redirected to page with adress 
http://galery/thumbnails.php?album=lastupby&uid=...

and here, clicking on thumbs does nothing, but after reloading page in browser,
images are displayed correctly.

ron4mac

Wow! You should be a professional software tester.  ;)

See v1.2 above.

kodif

Actually, I am :)

I am glad I can help :)

merly

The plugin works perfectly for images but I have a couple questions regarding .mp4 videos ?

Videos only play once then stop, is there any way to make a video loop by default ?  I know it's possible to right click on a playing video and select 'loop' but that seems to be browser dependant and requires user interaction on every video, so I was wondering if there were any way to configure fancybox (or coppermine) to always loop ?

I've also found when an mp4 finishes it automatically switches to the next video, as though slideshow were permanently on ? I can't find any way to disable. It doesn't have this behaviour with images, only videos (or mp4 specifically, not tried other formats)

Am happy to edit code just for my own use, am just really stuck on this one, thanks !

ron4mac

Quote from: merly on February 18, 2022, 04:31:23 PM
I've also found when an mp4 finishes it automatically switches to the next video, as though slideshow were permanently on ? I can't find any way to disable. It doesn't have this behaviour with images, only videos (or mp4 specifically, not tried other formats)

I'll look into to that ... would seem to be a bug.
I'll also see what I can come up with about looping.

merly


ron4mac

See new version (1.3.3) above that corrects the unwanted advance of videos when not in slideshow.

I won't be looking at the possibility of a looping option until I have time to upgrade the plugin to use the 4th generation version of FancyBox.

merly

that's brilliant man, thanks for all your hard work, you're a legend  8)

merly

I managed to find a temporary solution.

In file : \fancybox\fb\jquery.fancybox.min.js

Find : video class="fancybox-video"

Replace with : video class="fancybox-video" loop=""

ron4mac

Quote from: merly on February 19, 2022, 06:13:02 PM
I managed to find a temporary solution.

In file : \fancybox\fb\jquery.fancybox.min.js

Find : video class="fancybox-video"

Replace with : video class="fancybox-video" loop=""
;)

Radioven

Hallo,
ich habe die Fancybox v1.3.4 installiert, die auch soweit funktioniert. Seit der Installation dieses Plugins werden aber nur noch die Aufrufe von Videos (.mp4) gezählt, die von Fotos (.jpg) nicht mehr. Bei Fotos wird auch der entsprechende Timestamp (mtime) in der Datenbank nicht mehr aktualisiert. Die Zählung der Albenaufrufe funktioniert dagegen weiterhin. Woran kann das liegen?

Coppermine Photo Gallery 1.6.19
Fancybox Media Display v1.3.4
PHP 8.0.19

Gruß
Radioven

Radioven

Problem has been solved with version 1.3.6.

KchoPrro

Quote from: ron4mac on April 30, 2021, 01:36:40 AM

Update: v1.3.8 adds the capability to open image in an intermediate view (alt/option click thumbnail)
Update: v1.4.0 now functions in both gallery full image view modes

Thank you very much for continuing to improve the plugin.
I imagine that the user will have to choose between the two versions; 1.3.8 and 1.4.0 depending on whether you need to open the image from the thumbnails or from the gallery intermediate images. I have tested version 1.4.0 and it works correctly although it has fewer configuration options than version 1.3.8 (I imagine that is logical). I have detected 4 problems (in case you are interested in reviewing them):

Problem 1: When the image is not the right size (vertical images in my case), the plugin does not open the image, you have to find a larger image, open it, and then go back to see the previous one. For Example;
https://www.adolfoventas.es/galeria/displayimage.php?album=42&pid=511#top_display_media

Problem 2: I don't quite understand how the background darkening option works. In my case, whatever percentage I indicate does not change the color of the background.

Problem 3: The function add the number of views of the image does not work (I do not see that it changes anything).

Problem 4: For some reason, it doesn't work well in many albums, even removing the slider buttons in the image menu. For example;
https://www.adolfoventas.es/galeria/thumbnails.php?album=12

Personally, I think it would be nice if the plugin allowed to add or not the image description and title. I find that slideshows look prettier if only the image and image title are displayed.

I will leave the plugin active for a few days in my gallery, in case you want to see how it works with my albums:

I am attaching a screenshot of the settings. I also attach the Spanish language.

ron4mac

Quote
Problem 1: When the image is not the right size (vertical images in my case), the plugin does not open the image, you have to find a larger image, open it, and then go back to see the previous one. For
Part of the core CPG behavior is that, when an uploaded image is too small relative to your config file settings, a link to the full-sized is not created on the intermediate display because the image is already being displayed fully. Without that link, the substitution for the alternate view method was not occurring. I have found a method to get around that.

Quote
Problem 2: I don't quite understand how the background darkening option works. In my case, whatever percentage I indicate does not change the color of the background.
It should probably be called 'Background Opacity'. It is a measure of how opaque the slide background (black) is. Since your gallery background is black, it would be hard to notice any difference.

Quote
Problem 3: The function add the number of views of the image does not work (I do not see that it changes anything).
The hit count is subject to gallery settings. If browsing as an admin, the default is to not update hit counts.

Quote
Problem 4: For some reason, it doesn't work well in many albums, even removing the slider buttons in the image menu. For example;
https://www.adolfoventas.es/galeria/thumbnails.php?album=12
I'm not sure what is causing this ... it seems to only be an issue with that one category. I'll work at seeing if I can duplicate the condition.

Quote
Personally, I think it would be nice if the plugin allowed to add or not the image description and title. I find that slideshows look prettier if only the image and image title are displayed.
I certainly agree. I should have had options for that from the beginning. It was probably something I thought I would do later (after it was functioning otherwise) but then forgot about it. I'll include options for what text is shown.

Thank you for your feedback and helping me with this plugin.

ron4mac

#17
Here is an updated version with Problem #1 hopefully solved. And it has options for the display of text.

Problem #4 is quite weird and I don't yet see how it is happening. I see what is wrong but I believe it could only happen with interference from something else. Could you please give me a list of plugins that you have installed? Or, if you feel like it, you could disable some of your plugins to see if that one category works okay with them disabled.

KchoPrro

Quote from: ron4mac on August 30, 2022, 06:00:33 PM
Here is an updated version with Problem #1 hopefully solved. And it has options for the display of text.

Problem #4 is quite weird and I don't yet see how it is happening. I see what is wrong but I believe it could only happen with interference from something else. Could you please give me a list of plugins that you have installed? Or, if you feel like it, you could disable some of your plugins to see if that one category works okay with them disabled.

I don't know what you have done, but this version that you have uploaded has solved all 4 problems. Is incredible.

You can check it again, I have not touched anything, I have removed the previous version and uploaded the latest one (I have added the Spanish language) and everything works now as it should, and I can decide whether to add the description or just the title


Again, thank you very much for your great work  ;)

ron4mac

Great! I'm glad it is working better for you.  I see that the keyboard_navigation plugin that you are using does not get along well with Fancybox.

I may make a couple more changes/additions to it. Then maybe you could provide updated Spanish language for it.