nodebb-plugin-lightbox: Please update
-
I concur. A working lightbox plugin would be nice to have, again.
Along with the one you referenced (which I believe is a fork from exodo) there is this one, which also struggles in our current
v1.4.x
andv.1.5.0
versions.GitHub - psychobunny/nodebb-plugin-gallery: This NodeBB plugin feeds all posted images into a lightbox gallery
This NodeBB plugin feeds all posted images into a lightbox gallery - psychobunny/nodebb-plugin-gallery
GitHub (github.com)
Thanks.
-
Lightbox plugin situation could be fixed soon.
Main problem with all plugins that are trying to implement lightbox like effects is that their options and/or changes are overriden by nodebbs on image loading / unloading.
I made some changes to my nodebb installation that enabled me to use https://github.com/psychobunny/nodebb-plugin-gallery
More info on: https://community.nodebb.org/topic/10960/opening-uploaded-images-in-modal-windows (there is working suggestion there that you can use untill something similar is implemented to nodebb)
If changes get applied, it will be really easy to update https://github.com/psychobunny/nodebb-plugin-gallery or any other similar plugin that applies lightbox effect.
-
You have to do three things.
- You have to use public/src/client/topic/images.js from my commit that i hope will get into nodebb master
- and you have to install https://github.com/psychobunny/nodebb-plugin-gallery
- and you have to change "action:ajaxify.end" (line 4) inside this file: https://github.com/psychobunny/nodebb-plugin-gallery/blob/master/public/lib/main.js to "action:images.loaded"
Basicly what you do is: 1) create new hook inside nodebb and 2) use this hool inside already available plugin that does not work without that new hook.
If hook i submitted gets into master, i will submit change to that plugin too. If it doesn't get into that plugin ill create my own and put it out in the wild.
You can see it working here: https://bitcoin-hrvatska.com/forum/topic/7/testna-tema
-
Oh and BTW same thing can be used in other plugins that are trying to implement gallery like behaviour. They all need ability to add code to image link and this hook enables that so if it gets into master i think that we will see more working plugins in near future (if they are not abandoned by their mainteiners).
-
@sosojni said in nodebb-plugin-lightbox: Please update:
their
This is really great, I'll give it a test. Our users will be happy, thank you For the other plugins, I think they are all abandoned, I've contacted the maintainers and never got any answer... If you can fork the plugin and publish a working one, I believe you'll make a lot of happy users out there
BTW, there is another plugins that have a weird behaviour, this one nodebb-plugin-lightbox. Actually it works but only if the image is hosted somewhere else than the same URL of the nodebb
-
@sosojni Well I don't know what I'm missing, I don't know anything about nodebb, I've searched for image.js in my nodebb root installation and found 2 files. As I didn't know which one I had to edit, I changed both of them
nodebb:~$ find . -name "images.js" -print
./public/src/client/topic/images.js
./build/public/src/client/topic/images.js
nodebb:~$ vi ./build/public/src/client/topic/images.js
nodebb:~$ vi ./build/public/src/client/topic/images.jsThe installed and activated the plugin
Then changed the line in
nodebb:~ cd /node_modules/nodebb-plugin-gallery
nodebb:~ find . -name "main.js" -print
./public/lib/main.jsThen reloaded nodebb but nothing happens concerning the images still opening in separate browser tab.
-
Hook is merged ( https://github.com/NodeBB/NodeBB/pull/5828 ) so you can expect needed image plugins after 1.6 is released.
-
Already submited pull request for gallery: https://github.com/psychobunny/nodebb-plugin-gallery/pull/15
I see @psychobunny is active on this forums so i guess we wont have much problems with him applying that change. -
GitHub - psychobunny/nodebb-plugin-gallery: This NodeBB plugin feeds all posted images into a lightbox gallery
This NodeBB plugin feeds all posted images into a lightbox gallery - psychobunny/nodebb-plugin-gallery
GitHub (github.com)
it works on 3.10.3