WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
Feature Request: add custom CSS class to images (6 posts)

  1. techotronic
    Member
    Posted 3 years ago #

    Hi,

    I am the author of the jQuery Colorbox plugin.

    My plugin relies on a CSS class of images being set in order to activate the colorbox for them and to group them in the colorbox.

    It would be really convenient if there would be an easy way to add a CSS class to the images of a gallery.

    It would be even better if you could include my plugin in the list of lightbox clones to select from and add class="colorbox-<?php echo $gallery->ID ?>" to the image tags automatically.

    Cheers,
    Arne

    P.S.: One of the users of my plugin mentioned here that it would be possible to change the plugin template and add it to one's theme, but many users are not very tech-savvy, so I fear that only a very small group of users would actually be able to do that...

  2. Alex Rabe
    Member
    Posted 3 years ago #

    If it's similar to lightbox or thickbox it should be no prob...

  3. techotronic
    Member
    Posted 3 years ago #

    Hi Alex,

    thank you for your quick reply.

    Colorbox is a skinnable lightbox clone.

    Thanks for your help in advance!

    Cheers,
    Arne

  4. Alex Rabe
    Member
    Posted 3 years ago #

    Please check if at the effect page

    class="colorbox-%GALLERY_NAME%"

    can work for you

  5. techotronic
    Member
    Posted 3 years ago #

    Hi,

    for other images and WordPress galleries I use the Post/Page Id, so the whole plugin is counting on the CSS class being "colorbox-" and then a number...

    The number is then used to group images.
    If other images have the same number (e.g. all images having the CSS class "colorbox-123" are grouped). While it doesn't matter if the same number would be used for every gallery, it would be nice if different galleries would use different numbers, so if someone chooses to embed more than one gallery on one page or post, the images would be grouped separately.

    So, would it be possible for you to use the gallery-id?

    Cheers,
    Arne

  6. Alex Rabe
    Member
    Posted 3 years ago #

    Not without some code changes, I will look into it

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic