WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. jhoffmcd
    Member
    Posted 1 year 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?

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

  2. Tribalpixel
    Member
    Posted 12 months ago #

    solution:
    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']		;
      update_option('additional_viewers',$_REQUEST['additional_viewers']);
    }
  3. jhoffmcd
    Member
    Posted 11 months 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
    Member
    Posted 11 months 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
    Member
    Posted 11 months 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' );
    }

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

  6. ste9890
    Member
    Posted 5 months 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

About this Topic