Support » Plugin: Lightbox with PhotoSwipe » Use photoswipe with Nextgen

  • Resolved Gcpt

    (@gcpt)


    Thank you for keeping this plugin updated. I’m trying to use photoswipe for nextgen gallery images. I’ve created a custom template for nextgen by uploading the gallery-swipe.php file from here to my theme directory. The images are now opening in photoswipe but the gallery page has lost the thumbnail grid display. Can you help me to retrieve the grid display.

    • This topic was modified 4 years, 11 months ago by Gcpt.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Gcpt

    (@gcpt)

    It’s always the way, as soon as you ask the question you find the answer. In the gallery-swipe.php file I changed line no 80 from: <div class="item" id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box" <?php echo $image->style ?> >
    to
    <div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box" <?php echo $image->style ?> >
    Now working perfectly.
    One problem I have is when you scroll the lightbox closes, can this be fixed so as the lightbox stays open until you click on the page.

    • This reply was modified 4 years, 11 months ago by Gcpt.
    • This reply was modified 4 years, 11 months ago by Gcpt.
    • This reply was modified 4 years, 11 months ago by Gcpt.
    Plugin Author Arno Welzel

    (@awelzel)

    Thanks for the suggestions.

    Concerning the behaviour when scrolling: this is done inside the PhotoSwipe code and can be turned off using the closeOnScroll option (also see http://photoswipe.com/documentation/options.html.

    When you want to add this manually you can add this in js/photoswipe.js.

    Change

    		options = {
    			index: index,
    			getThumbBoundsFn: false,
    			showHideOpacity: true,
    			history: false,
    			shareEl: false
    		};

    to

    		options = {
    			index: index,
    			getThumbBoundsFn: false,
    			showHideOpacity: true,
    			history: false,
    			shareEl: false,
    			closeOnScroll: false
    		};

    This should work (edit: closeOnScroll: false and not closeOnScroll: true).

    In future versions there may be a configuration in the backend to change the options, so you don’t have to modify the code with each update.

    • This reply was modified 4 years, 10 months ago by Arno Welzel.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Use photoswipe with Nextgen’ is closed to new replies.