WordPress.org

Ready to get started?Download WordPress

Forums

Photoswipe for NextGEN Gallery
[resolved] Plugin Code Error, Fix Request (3 posts)

  1. ejb5oh
    Member
    Posted 1 year ago #

    Hello,

    Its me again. Your plugin rocks and I cannot live without it. I had a good buddy of mine research a problem recently and the problem was found to have been created by your plugin.

    My issue, I am using the Alyeska Theme by Jason Bobitch. When I use photoswipe, it seems to apply the javascript settings to every page on my site without knowing if a photo gallery was present or not on the page that it loads. In doing so, it would screw up navigation and screwed up tabbed content. My coder found the issue and fixed it.

    I am sure this is not only affecting this theme, but probably affecting many others. I ask that you please consider the following fixes as prescribed by my coder:

    The following error occurs when browsing any page that does not have a gallery set up on a mobile device:

    Uncaught Code.PhotoSwipe.createInstance: No images to passed.

    The fix is to only call the photoSwipe() function if there is a gallery on the page. In ngg-photoswipe.js, we simply return if there are no thumbnail images before the main call to photoSwipe():

    //Ready for photoSwipe!
    jQuery(function(){
    if (jQuery('.ngg-gallery-thumbnail a').length == 0)
    return;
    jQuery(".ngg-gallery-thumbnail a").photoSwipe({
    ...

    http://wordpress.org/extend/plugins/photoswipe-for-nextgen-gallery/

  2. ejb5oh
    Member
    Posted 1 year ago #

    Thank you for this awesome plugin!! just trying to help out.

  3. Guillermo Seņas
    Member
    Plugin Author

    Posted 1 year ago #

    Check out the new version (1.2) this issue should be fixed.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.