WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
[resolved] How to envoke a lightbox gallery with just one thumbnail (17 posts)

  1. vestaxpdx_2
    Member
    Posted 3 years ago #

    Hi is this possible?

    I have the lightbox 2 plugin installed and using the default [nggallery id=1] etc lists all the images as little thumbnails and when clicked you can go through them via the lightbox plugin.

    All I want to do is just show 'one' thumbnail that when clicked opens the image in the lightbox format and still allows to click through the rest of the images in that gallery.

    I cant find any example for this, I would of thought lots of people would want to do this.

    Can anyone help?

  2. cschmitt
    Member
    Posted 3 years ago #

    Quick and dirty...

    I added these lines to NextGEN Gallery's stylesheet:

    .ngg-gallery-thumbnail-box { display:none; !important;}
    #ngg-image-1 {display: block; !important;}

    This hides every thumbnail but the first.

    Hope this helps.

    Cheers,
    Christian

  3. vestaxpdx_2
    Member
    Posted 3 years ago #

    Thanks for that, nice hack!

    I was thinking of going down the CSS route too. Hopefully NextGEN will add this feature in the future.

    Thanks again!

  4. cschmitt
    Member
    Posted 3 years ago #

    A little follow-up...
    The above does not work correctly, if you change NextGEN Gallery's sorting. Let's say you sort your gallery so that the 5th image is displayed as the first one. The the above CSS would still show image no. 1, since the id ist still ngg-image-1.

    This should work better:

    div.ngg-gallery-thumbnail-box { display:none; }
    div.ngg-galleryoverview div:first-child { display:block; }
    
    /* Star HTML hack. Styles are only interpreted by IE6 */
    * html div.ngg-gallery-thumbnail-box { display:block; }

    I included the star HTML hack because otherwise you'd see no thumbnail at all in IE6.

    Cheers,
    Christian

  5. vestaxpdx_2
    Member
    Posted 3 years ago #

    Cool, good thinking. You saved me more future headache!

    Thanks,
    Alex

  6. kategolden
    Member
    Posted 3 years ago #

    This is great - finally, just what I need.

    Once I've added this, how/where do I invoke it?

  7. Paulio51
    Member
    Posted 3 years ago #

    Since it's in CSS it will be envoked whenever you call for a gallery. One thing that I noticed is that with this hack you will need to remove the link to slideshow as that will be the firstchild if it is enabled.

  8. Destillator
    Member
    Posted 3 years ago #

    This is just what I needed! Unfortunately, it doesn't display the thumbnail in IE8. Has anyone tried to fix this?

  9. whitehats
    Member
    Posted 3 years ago #

    Hi,

    Is it possible to display separate galleries which do not get grouped into a single gallery? I want to display several galleries which don't get played within the same slideshow, and each will have their own thumbnail.

    Thanks,
    -tejas

  10. Destillator
    Member
    Posted 3 years ago #

    Yes, I'm using it this way. Just make your individual galleries and link to them in your page or post.

  11. whitehats
    Member
    Posted 3 years ago #

    On a single page? For me, all the galleries on a single page are linked and the images are displayed in a single slideshow! :(

  12. Destillator
    Member
    Posted 3 years ago #

    Yep, on a single page. But you have to use separate gallery-tags such as [nggallery id=1], [nggallery id=2], etc.

  13. whitehats
    Member
    Posted 3 years ago #

    Oh, that! I am already doing that. And that is not a problem.

    I am using ColorBox that groups all image on a page and displays as a single slideshow. May be I will use Lightbox and style it as necessary.

  14. Destillator
    Member
    Posted 3 years ago #

    That sounds like a good idea. Does your gallery show the thumbnail in IE8?

  15. whitehats
    Member
    Posted 3 years ago #

    Yes, it does.

  16. JSnyder27
    Member
    Posted 3 years ago #

    Thank you so much for this hack! This has been driving me completely nuts! I do hope it's included in the next hack.

  17. llaughy
    Member
    Posted 3 years ago #

    This is working great - but am wondering if there is a way to launch the slideshow from a link only, without the thumbnail? I would like to add a link to launch the slideshow in a place that I can't use the shortcode. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.