WordPress.org

Ready to get started?Download WordPress

Forums

add-rel-lightbox
[resolved] Disable Groups (7 posts)

  1. cwendt01
    Member
    Posted 2 years ago #

    This is almost exactly what I was looking for -- I didn't want my client to have to manually code in rel="lightbox", because I know they won't.

    However, I see that the code also groups ALL the images on one page. I can't have this for my current website's pages, so sadly I'm not able to use this plugin. :(

    Are there any workarounds to this by any chance?

    Thanks,
    - C.

    http://wordpress.org/extend/plugins/add-rel-lightbox/

  2. DefProc
    Member
    Plugin Author

    Posted 2 years ago #

    Change

    " rel="lightbox[post-' . $id . ']"

    to

    " rel="lightbox"

    in version 0.3.

    Or for version 0.4, change

    $a->rel = "lightbox[post-" . $id . "]";

    to

    $a->rel = "lightbox";

    Really I'd like to set it in an admin page, but that's on the todo list.

  3. cwendt01
    Member
    Posted 2 years ago #

    Thank you for the response!

    Since I know PHP, I actually already did that. But for some reason, it was still grouping the photos.

    I ended up using another plugin (Add Any Lightbox) that added a box for "Rel" in the media manager window, so I set my images to rel="light[1]", rel="lightbox[2]", and so on. That's the only thing I could do to get it to work...

  4. DefProc
    Member
    Plugin Author

    Posted 2 years ago #

    That seems less than ideal, what lightbox clone are you using? Some allow the gallery mode to set as default instead of the single mode.

  5. cwendt01
    Member
    Posted 2 years ago #

    I agree with you there. But since I'm only using lightboxes on 1 page, it's not too inconvenient.

    I'm using the "Lightbox Plus" plugin to generate my lightboxes. I checked just now and I don't have any slideshow or gallery settings turned on.

  6. DefProc
    Member
    Plugin Author

    Posted 2 years ago #

    Ah, I see, from the instructions on the plugin page, lightbox plus works the opposite way to the ones I've seen so far. It seems to need the unique id to *stop* the grouping:

    rel="lightbox[uniqueID|filename]"

    how about rel="lightbox[wp-image-' . $val[5] . ']" in line 41 to use the image post id?

  7. cwendt01
    Member
    Posted 2 years ago #

    I bet you that'd work! I couldn't figure out, since the PHP used a str_replace function (pulling that from top of head, but it sounds wrong...), I couldn't figure out how to tell it to insert a random variable for inside the lightbox[] brackets.

    I'll give it a go next time I'm working on that website. Thank you! :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.