• Resolved Paul

    (@paulcass82)


    I am currently using the Fancybox for WordPress plugin with the NextGEN Gallery plugin on my site and it works great. However when browsing my site on a mobile device and I click on an image the fancybox modal window appears and then the photoswipe gallery loads on top of this. If I use the default ‘shutter’ effect without fancybox for the NextGEN gallery everything works fine but I would really like to use fancybox as it looks much nicer. Any ideas how to disable fancybox for mobile devices? Thank you in advance.

    https://www.ads-software.com/extend/plugins/photoswipe-for-nextgen-gallery/

Viewing 6 replies - 16 through 21 (of 21 total)
  • koendewit

    (@koendewit)

    Hi Guillermo, I’m kind of dealing with the same issue. I use the Fancybox for WordPress plugin combined with NextGen and would like to use your plugin for mobile visitors.
    Although your Photoswipe loads fine, so does Fancybox. Then it closes again, leaving the Fancybox background as an overlay on Photoswipe. Any idea on how I to get around this?

    for an example please visit koendewit.com/2010/01/dia-2010
    Thanks in advance for your time and effort!

    Koen

    thelittlesun

    (@thelittlesun)

    same for me.
    I have enabled: “Replace viewer with Photoswipe only on mobile browsers”
    I don’t have any code in Nggallery–>Options–>Effects
    i have FancyBox enabled.
    it works fine on computer browsers (Fancy Box)
    i doesn’t work fine on mobile browsers (Fanybox overlays the Photoswipe)

    hm…

    koendewit

    (@koendewit)

    little sun, try this;
    open one of your gallery pages and check the source code for one of the thumbnails, either with Firefox > Tools > Web Developer > Inspect or Safari’s Develop > Show Page Source. You’ll find it saying something like: `<a href=”https://yoursite.com/wp-content/gallery/name/image.jpg&#8221; title=” ” class=”fancybox_plugin” rel=”set_11″>
    <img title=”title” alt=”title” src=”https://yourwibsite/wp-content/gallery/name/thumbs/thumbs_image.jpg&#8221; width=”64″ height=”48″></a>`

    Then open the plugin editor in WordPress, select Photoswipe for NextGEN Gallery, and open

    photoswipe-for-nextgen-gallery/js/ngg-photoswipe.js

    Then add the fancybox_plugin_class to the list below, like this:

    jQuery(document).ready(function(){
    	//Remove thickbox effect:
    	jQuery('a.thickbox').removeClass ("thickbox");
    	//Remove lightbox effect:
    	jQuery('a[rel^="lightbox"]').attr("rel","");
    	//Remove highslide effect:
    	jQuery('a.highslide').removeClass("highslide").attr("onclick","");
    	//Remove shutter effect:
    	jQuery('a[class^=shutterset]').removeClass (function (index, css) { return (css.match (/\bshutterset\S+/g) || []).join(' '); });
    	//Remove fancybox effect:
    	jQuery('a.fancybox_plugin').unbind('click.fb').addClass('nolightbox').removeClass('fancybox_plugin');
    });

    (just replace (‘a.fancybox_plugin’) and (‘fancybox_plugin’) with the name of the class you find in the source code)

    Workes for me, I use NextGEN Gallery Fancyboxer which creates a class=myfancybox. Good luck!

    Hello i need your help, i need jquery for my sites, i use FancyBox Gallery and all insatlling, effect code removed. but if i go to my site image opened via nextgen viewer. check pls
    eliyefet.co.il/

    @mintonxbz, not shure if I understand your question, but did you check the options “Deactivate gallery page link > The album will not link to a gallery subpage. The gallery is shown on the same page.” and “Show first > Thumbnails” and uncheck “Integrate slideshow” in the Nextgen Gallery > Option > Gallery settings?

    This worked for me, I am using Ng Gallery Optimizer Modified which uses fancybox, This is code one should use.

    jQuery(document).ready(function(){
    	//Remove thickbox effect:
    	jQuery('a.thickbox').removeClass ("thickbox");
    	//Remove lightbox effect:
    	jQuery('a[rel^="lightbox"]').attr("rel","");
    	//Remove highslide effect:
    	jQuery('a.highslide').removeClass("highslide").attr("onclick","");
    	//Remove shutter effect:
    	jQuery('a[class^=shutterset]').removeClass (function (index, css) { return (css.match (/\bshutterset\S+/g) || []).join(' '); });
    	//Remove fancybox effect:
    	jQuery('a.myfancybox').unbind('click.fb').addClass('nolightbox').removeClass('myfancybox');
    });
Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘[Plugin: Photoswipe for NextGEN Gallery] Using Fancybox for WordPress plugin with Photoswipe.’ is closed to new replies.