Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2   Go Down

Author Topic: Fancybox media viewer  (Read 15616 times)

0 Members and 1 Guest are viewing this topic.

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Fancybox media viewer
« on: April 30, 2021, 01:36:40 am »

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

« Last Edit: August 31, 2023, 05:10:53 pm by ron4mac »
Logged

kodif

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Fancybox media viewer
« Reply #1 on: August 11, 2021, 01:52:48 am »

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

Quote
Fatal 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
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Fancybox media viewer
« Reply #2 on: August 11, 2021, 01:44:44 pm »

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

kodif

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Fancybox media viewer
« Reply #3 on: August 11, 2021, 05:40:56 pm »

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.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Fancybox media viewer
« Reply #4 on: August 11, 2021, 08:25:48 pm »

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

See v1.2 above.
Logged

kodif

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Fancybox media viewer
« Reply #5 on: August 13, 2021, 01:41:11 pm »

Actually, I am :)

I am glad I can help :)
Logged

merly

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Fancybox media viewer
« Reply #6 on: February 18, 2022, 04:31:23 pm »

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 !
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Fancybox media viewer
« Reply #7 on: February 18, 2022, 06:24:11 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.
Logged

merly

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Fancybox media viewer
« Reply #8 on: February 18, 2022, 07:25:20 pm »

thank you, much appreciated  8)
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Fancybox media viewer
« Reply #9 on: February 19, 2022, 12:53:11 am »

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.
Logged

merly

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Fancybox media viewer
« Reply #10 on: February 19, 2022, 04:11:33 pm »

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

merly

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Fancybox media viewer
« Reply #11 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=""
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Fancybox media viewer
« Reply #12 on: February 19, 2022, 06:57:04 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=""
;)
Logged

Radioven

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: Fancybox media viewer
« Reply #13 on: June 09, 2022, 03:53:59 pm »

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
Logged

Radioven

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: Fancybox media viewer
« Reply #14 on: June 21, 2022, 03:28:40 pm »

Problem has been solved with version 1.3.6.
Logged

KchoPrro

  • Coppermine frequent poster
  • ***
  • Country: es
  • Offline Offline
  • Gender: Male
  • Posts: 296
    • Adolfo Ventas - Naturaleza Andaluza
Fancybox media viewer
« Reply #15 on: August 29, 2022, 08:29:56 pm »


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.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Fancybox media viewer
« Reply #16 on: August 30, 2022, 01:46:56 pm »

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.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Fancybox media viewer
« Reply #17 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.
« Last Edit: August 31, 2022, 04:36:00 pm by ron4mac »
Logged

KchoPrro

  • Coppermine frequent poster
  • ***
  • Country: es
  • Offline Offline
  • Gender: Male
  • Posts: 296
    • Adolfo Ventas - Naturaleza Andaluza
Re: Fancybox media viewer
« Reply #18 on: August 30, 2022, 08:09:57 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  ;)
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Fancybox media viewer
« Reply #19 on: August 30, 2022, 10:17:05 pm »

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.
Logged
Pages: [1] 2   Go Up
 

Page created in 0.029 seconds with 20 queries.