WordPress.org

Forums

WP jQuery Lightbox
Modifying WP jQuery Lightbox (7 posts)

  1. Photog
    Member
    Posted 3 years ago #

    I recently installed the lightbox plugin and had previously been using Lightbox 2.

    With Lightbox 2, there were settings to change the background colour, change the size of the box and so forth.

    Is it possible to make these types of changes with WP jQuery Lightbox? Is it a matter of modifying the CSS? Also, the lightbox adjusts size to suit the image rather than resizing the image inside a static box. Is it possible to have a static box and the image resize?

    Thanks.

  2. ulfben
    Member
    Plugin Author

    Posted 3 years ago #

    Styling is done through CSS.

    A static size is possible but I don't know if it's worthwhile. The current behavior seems like a better strategy: it scales to fit on smaller screens, while allowing full-size view on high-res displays.

  3. Photog
    Member
    Posted 3 years ago #

    Thanks. Yes, I know it scales for smaller screens. That's not really the issue. A static size of, say, 800px x 800px would still fit on most smaller screens. The issue is more with optics. The box constantly resizing for portrait and landscape images is a bit annoying. I'd prefer a static box size with the images resizing to fit.

  4. ulfben
    Member
    Plugin Author

    Posted 3 years ago #

    Feel free.

  5. Photog
    Member
    Posted 3 years ago #

    LOL! Thanks. That gets me back to my original question then. What would need to be modified in the CSS to achieve that?

    I've managed to get the background colour changed. But can't yet figure out what to change to make the box static.

    Something else that's interesting is that with some images, just the Caption is picked up and with some both the Caption and the Title. I've amended the CSS to remove Title and it still shows up in some. Odd.

  6. ulfben
    Member
    Plugin Author

    Posted 3 years ago #

    Give me a link to some examples of that behaviour.

    To get a static size you'd have to edit the javascript. The script is minified so you need to edit wp-jquery-lightbox.php first. Search for jquery.lightbox.min.js and replace it with jquery.lightbox.js.

    All scaling is managed in function doScale(). Play with it until you get what you need. If you succeed, please share the code. If it's clean I might add it to the plugin proper.

  7. Photog
    Member
    Posted 3 years ago #

    Any of the image galleries on my site will show it.

    As far as whether it will be clean, that's asking a lot. :-) I'm not a programmer so any code I write is likely going to be far from clean.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic