Lightbox and Coppermine plugins

Edit: Due to hassles and constant updates required to Coppermine I’ve given up with it so the example photo below won’t show up any more. However the article should still be valid although I am not updating it for any future changes to Coppermine.

I’ve been finding it a struggle to get photos embedded in a page with a set layout such as a WordPress blog. One option is to change the layout but another is to instead have the photos appear on top of the page instead thus releasing them from the constraints of the layout.

Such a solution is available in the form of Lightbox JS. I then discovered this script has been wrapped up in a WordPress plugin, Lightbox JS WordPress Plugin. Further to this there is a modification of this script to allow the photos to be scaled to the browser display with an option to view at full size, as in the Lightbox Plus WordPress Plugin.

I have in the meantime been linking in my images from my Coppermine Gallery using the Coppermine Plugin, but this just links to Coppermine when clicking on thumbnails, so I’ve made a couple of modifications to make the plugin optionally use Lightbox.

As an example, here’s a photo to try out…


Click on the image for a larger photo.

Modifications to the Coppermine Plugin (this is a diff view between the original and my changes)

Click here to download the modified plugin (you will need to edit the file and configure the database settings).

Essentially I’ve added an additional mode called ‘lightbox’ to CPGSC_SINGLEIMAGE_LINK and modified where this is used. I’m not sure if this will work for album views, probably not.
Note that I’ve also made another modification to the plugin to display a copyright message beneath photos when viewed in ‘normal’ mode, but this is optional and not currently being used in lightbox mode.