Page 1 of 1
Lightbox: Can it allow swiping images
Posted: Sat Aug 16, 2025 5:40 am
by jmglastetter
Is lightbox able to allow swiping through images in addition to clicking the left/right arrows?
Re: Lightbox: Can it allow swiping images
Posted: Sun Aug 17, 2025 8:45 pm
by onli
I don't think so, at least I see nothing about that on the lightbox homepage,
https://lokeshdhakar.com/projects/lightbox2/#examples. The plugin supports alternative lightbox scripts and I'd have expected magnific to support it, but they link to
https://www.smashingmagazine.com/2013/0 ... -lightbox/ - which explains why it might not be a good idea, as it blocks zooming - and
https://photoswipe.com/ for an alternative, which does support swiping.
If you think it's useful we maybe should add photoswipe to the lightbox plugin, as an option? Though I'm not sure the plugin has an active maintainer, maybe you are interested?
Re: Lightbox: Can it allow swiping images
Posted: Thu Aug 21, 2025 2:27 am
by jmglastetter
Yes! Photoswipe looks to be an updated version of all our existing options, and also made by the same author as Magnific. It would be a good upgrade for getting lightboxes more intuitive on touch-devices.
I've never maintained a plugin before, but would be willing to learn how. Does S9Y have the ability to see how many users have each of the lightbox scripts in use? I would think the only two that would be necessary would be Lightbox 2 and Photoswipe.
Re: Lightbox: Can it allow swiping images
Posted: Thu Aug 21, 2025 2:34 pm
by onli
jmglastetter wrote: Thu Aug 21, 2025 2:27 am
I've never maintained a plugin before, but would be willing to learn how.
That would be seriously awesome.
https://github.com/s9y/additional_plugins/ is the git repository to fork, then you can change the serendipity_event_lightbox plugin in your copy and send in a Pull Request via the Github website. I will then help you to finish it (if necessary), and you can always ask questions (here or via PM) if you want.
https://docs.s9y.org/docs/developers/plugin-api.html has some documentation about plugins, a few years ago I wrote a german introduction at
https://www.onli-blogging.de/879/Einfue ... eiben.html (I would hope modern tools translate it well),
jmglastetter wrote: Thu Aug 21, 2025 2:27 am
Does S9Y have the ability to see how many users have each of the lightbox scripts in use?
No, we have no telemetry whatsoever. I did recently remove one lightbox variant, prettyPhoto, but that was because it was completely broken and the project abandoned.
https://github.com/s9y/additional_plugins/pull/179 was the PR.
jmglastetter wrote: Thu Aug 21, 2025 2:27 am
I would think the only two that would be necessary would be Lightbox 2 and Photoswipe.
I remember that Magnific was really good back then. Does Photoswipe really solve all the issues with the swiping approach that magnific talked about, like the inability to zoom? I would say: Keep it simple for now, adding photoswipe next to the existing two scripts is already great.
Re: Lightbox: Can it allow swiping images
Posted: Sat Aug 23, 2025 3:35 pm
by jmglastetter
Git, repository, fork, pull request
I am already down the rabbit hole on what these terms mean, and how to use Github. But once I have learned how to use it, I will hopefully get you that pull request!
Re: Lightbox: Can it allow swiping images
Posted: Fri Oct 10, 2025 9:00 am
by onli
Hey
A git repository is a place where the code files are stored, via the source control software git. One can then see the history of changes and potentially restore changes that did not work out.
Forking means copying such a repository, so you can make your own changes without the rights to write into the original location. When you then have made your changes locally, you usually upload them (push them) into you copy of the repository. And to make the original repository also get the changes you can send them in via a pull request (=a request to pull in the changes you made).
It's not completely easy, those are many concepts to learn. But in practice Github leads you through adequately. You can always also just make your changes locally and send me a copy, and of course I would answer questions.
Best of luck, if you still want to try :)
Re: Lightbox: Can it allow swiping images
Posted: Thu Nov 27, 2025 3:54 am
by jmglastetter
I still plan on looking into this.
Just finished learning how to get my site to show a light & dark mode based on the users device preference.
In the next couple months, I will be entering my slow season with work, and will then have the time to dive into figuring out the image swiping for you!
Re: Lightbox: Can it allow swiping images
Posted: Fri Nov 28, 2025 12:52 am
by onli
Awesome :)