Please or Register to create posts and topics.

Integration with Foobox / Various lightbox plugins

Hello,

First of all, thanks a lot for this forum plugin! It works nicely 🙂

I would now like to add the possibility to show attachments (and inline images) in lightboxes.

Most lightbox plugins will “scan” the page for images and add a class to them. This does not seem to work with the way the files are attached. BTW not using the media gallery is fine for me! 🙂

I’ve seen the other topics where you mentionned that one had to modify the lightboxe’s configuration, but thatwhat you are asking for does not seem to be possible, at least for Foobox.

It would be great if there was an option in the settings to add a CSS class to the image attachments. For instance, for Foobox it’s simply… “foobox” in the class of the link (not of the image). Plus rel=”gallery” in case there are more than one images.

If that’s not possible in the short term, would you be so kind as to indicate which function I should overload in the functions.php of my theme please?

Thanks a lot!

Damien

Hello again,

I tried a different plugin (Easy Fancy Box) that seems to detect the images fine. But this plugin causes other issues, so I’d like to make Foobox work.

In this thread: https://asgaros.com/support/topic/uploaded-images/?part=1

@beezer suggested modifying the way the attachments are rendered in HTML. I’d rather avoid modifying the plugin files, and instead overload the function in my child theme functions.php. Is that how you did it Beezer? I’m not good enough in Wordpress development to actually know how to create the function 🙁

It would be great if you had a couple minutes to give me a couple hints, thanks!

Damien

Hello @damien-pochon

Basically its a nice idea. However, I think lightbox-functionality is more related to the used theme or as a standalone-extension which adds this functionality to all images on the website – not only to the ones used in the forum. To avoid overhead and prevent the case that multiple lightbox-libraries are used on a website, I am currently avoid adding this functionality. However, maybe I will change my mind in the future. 🙂

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!