XF 2.1 Faking the Lightbox?

Grahame

Member
On our minty-fresh 2.1.4 XF install we imported about 350,000 images into XFMG, but most if not all of the links to said images in the existing threads are in the standard [ URL=http://img.jpg ] [ IMG=/thumbs/img.jpg ] format and the images that are linked no longer exist (it was a 50gb directory I didn't want to keep around). With a combination of rewriterules and PHP/MySQL I got it so that the URL is rewritten/redirected to the media /full or /xfmg/thumbs image as appropriate and this allowed Xen to show all of the images correctly - go me!

However clicking on the thumb opens the /full image as it should, but in the same window/tab as the original thread with the only way back being the browser back button. Now I want to see if I can "fake" a lightbox for each image so that the image opens in a new closable layer. I tried adding the "js-lbImage" class to the img tags using a custom BB tag, and this allowed clicking on the image to open the XF Lightbox but of course the images are broken because the source isn't the right format.

I know this is a long shot but has anyone done anything like this? Here's a link to a thread that acts as I've described, as you can see all of the images are just https://url/image.jpg format but if you click they redirect to a real Xen URL. I'm hoping that there's a simple trick to make that image open in a Lightbox.

 
Top Bottom