• Resolved Dr.Zee

    (@drzee)


    I just bought the Pro version of NextGen Gallery. This plugin is exactly what i want. But, as as seems to always be the case, it won’t do the one thing that I need it to.

    I need to launch a gallery from a single image. Not a thumbnail, a 100% width image. I can’t use a slideshow because there are too many images/galleries on the same page. I also can’t use a slideshow because there’s no option to start them paused, so even if I could load about 100 images onto the same page at the same time, they would all be animating and it would be terrible.

    I found an approach that works perfectly in Firefox, but not in any other browser. You can see it in action here: http://dev.venuesix10.com/space
    The page is broken into rows, each row is an image that triggers a NextGen Gallery. I place a Pro Thumbnail grid gallery showing 1 thumbnail on each row and hide it using css. Then I add trigger attributes to the appropriate image. Like I said, this only works in Firefox. In every other browser it launches the ProShadowbox but it’s empty, or it shows the first image of the gallery and nothing else.

    Here is my current code——————————-

    The gallery I’m putting on the page but hiding:

    <div class="hidden">
    <img
         class="ngg_displayed_gallery mceItem"
         src="http://dev.venuesix10.com/nextgen-attach_to_post/preview/id--1070"
         alt=""
         data-mce-placeholder="1" />
    </div>

    The image I launch the gallery from:

    <img
         class="ngg-trigger nextgen_pro_lightbox"
         src="http://dev.venuesix10.com/wp-content/uploads/2015/10/gallery-10_main.jpg"
         alt="gallery-10_main"
         width="100%"
         data-nplmodal-gallery-id="1070"
    />

    I have tried around 20 different approaches to making this work in other browsers with no success. I’ve tried hacking the plugin, but the architecture is just too complex. I’ve tried making my own display plugin with very limited success.

    Please help, either to tell me that it can’t be done or to direct me to what attributes need to be included in the trigger image or trigger image wrapper. If I can’t make it work I’m going to have to start searching for an entirely new gallery solution. Thank you.

    https://ww.wp.xz.cn/plugins/nextgen-gallery/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Dr.Zee

    (@drzee)

    Correction: The classes on the trigger image are

    class="mceItem nextgen_pro_lightbox"

    Thread Starter Dr.Zee

    (@drzee)

    I got it.
    It turned out that every browser but Firefox was stripping the
    data-nplmodal-gallery-id
    attribute from the trigger element. I added a unique class to each trigger element
    <div class="gallery-1070">
    then appended the data attribute with jQuery
    $(".gallery-1070").attr("data-nplmodal-gallery-id", 1070);
    and now it’s working beautifully. Clearly this can’t be used on a site that’s constantly adding galleries like this, but for a site that doesn’t change often, this is just fine.
    If you could work on a display plugin that just wraps an image with a gallery trigger, that would be much appreciated.

    Plugin Contributor photocrati

    (@photocrati)

    @dr.Zee – Thanks for sharing this but please contact our support team directly with any questions or concerns for NextGEN Pro displays via your member’s area at http://nextgen-gallery.com/

    Thanks!

    – Cais.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Launch gallery from simple image’ is closed to new replies.