Photoswipe for NextGEN Gallery
Disable Checkbox Possible Bug (6 posts)

  1. jhoffmcd
    Posted 3 years ago #

    In the Photoswipe menu, there is an option that says

    Disable other viewers

    This check-box will stay checked while you are on the page, but if you navigate away and then return it becomes unchecked again.

    The problem is that I have easyFancybox set up and I don't want that script to load on mobile and tablet. Has anyone else troubleshot this without using CSS?


  2. Tribalpixel
    Posted 3 years ago #

    in ngg-photoswipe.php, put the update_option in the if ($_REQUEST['nggphotoswipe_enabled']) on line 73

    if ($_REQUEST['nggphotoswipe_enabled']) {
      update_option('nggphotoswipe_enabled',$_REQUEST['nggphotoswipe_enabled']		;
  3. jhoffmcd
    Posted 3 years ago #

    My only worry here is in directly editing the plugin files? Isn't this generally frowned upon? I'm worried that whoever updates this may overwrite the changes.

  4. Tribalpixel
    Posted 3 years ago #

    you will lose the hack if the plugin update.
    but i think it will be corrected/integrated by the plugin developper on next version ;)

  5. Tribalpixel
    Posted 3 years ago #

    or you can simply disable fancybox in your theme directly:
    and dont't care of the option in option page ;)

    by using something like that:

    if( wp_is_mobile() ) {
      wp_enqueue_script('ngg-photoswipe-disable-fancybox.js',get_template_directory_uri().'/js/ngg-photoswipe-disable-fancybox.js', array( 'jquery' );

    copy ngg-photoswipe-disable-fancybox.js from plugin directory in your theme directory

  6. ste9890
    Posted 2 years ago #

    This doesn't work for me. It just seems to be impossible to disable Fancybox when Photoswipe is in use on mobile. Despite the fact it is supposed to be achieved with a simple checkbox in the plugin settings!

    Can you provide any more help on this?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Photoswipe for NextGEN Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic