Piwigo / piwigo-bootstrap-darkroom

A mobile-ready and feature-rich theme for Piwigo photo gallery, based on Bootstrap 4
Apache License 2.0
81 stars 40 forks source link

PhotoSwipe only working for Webmaster #356

Closed FredFabLab closed 1 year ago

FredFabLab commented 1 year ago

I have the following problem: I'd like to open PhotoSwipe's lightbox by default when clicking on a picture's thumbnail. I've found the corresponding setting under Configuration > Themes > Boorstrop Darkroom > Configuration > Settings > Appearance > Thumbnail page display > Link thumbnail to PhotoSwipe Slideshow. It works perfectly fine when I'm logged in as the webmaster. But for other users (User or Generic), the Picture details page opens, the full-screen button is also not working. Is there a requirement to enable PhotoSwipe for all users? I didn't find an option for that… Or do you have any other ideas?

Tested on:

ClaudiaLev commented 1 year ago

Sounds like the same problem: https://github.com/Piwigo/piwigo-bootstrap-darkroom/issues/353

FredFabLab commented 1 year ago

Also thought so, but @MondyNor mentioned it's solved in 2.5.17 while I still have the problem within this version.

MondyNor commented 1 year ago

Sounds like the same problem: #353

No, the problem i had was to show pictures full screen, as i understand his post he has problem with getting the slideshow to work. Anyway maybe it can be related to a plugin so here are a list of all the plugins i have installed and which ones i have active https://gyazo.com/33e30cf5a577a8947801709c3a321f7e

And my configuration for the theme https://gyazo.com/86262b729a530abd6ff2ba48de8ceff5

FredFabLab commented 1 year ago

Oh, I'm very sorry! I created my Piwigo installation some time ago and totally forgot about plugins (which I normally first try to deactivate…). I had the plugin “rightClick” installed and activated. When I deactivate this plugin, it works perfectly. Thank you, @ClaudiaLev and @MondyNor!

PS: I know that disabling the right click is in no way fully protecting images from being stolen, but this is a private photo share and I just wanted to prevent some people from downloading them. Now, I implemented the same feature with an additionalHead element, some JavaScript (which again is easy to bypass):

<script>
document.addEventListener("contextmenu", function(e){
    if (e.target.nodeName === "IMG") {
        e.preventDefault();
    }
}, false);
</script>
MondyNor commented 1 year ago

You could also use the watermark option for that, which i do :) Good to her you solved it

DeWir3 commented 11 months ago

Thanks for the script! I managed to disable the right-click menu with that using the Personal Plugin option as described here https://github.com/Piwigo/piwigo-bootstrap-darkroom/wiki/Add-custom-CSS-and-Javascript