Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #11705
    Tobias Maigut
    Participant

    Hi,

    we bought the PhotoSwipe Add on to add the social media functions to our https://de.wordpress.org/plugins/folder-gallery/ galleries.

    problem: from the moment i choose PhotoSwipe as lightbox script instead of swipeBox or any other script, it stops working and just shows the plain image file as WordPress does out of the box. The lightbox functionality only works without PhotoSwipe add-on. Other WP galleries do work with PhotoSwipe but we need the social features especially for folder fed galleries.

    If this is not working, the costs for the premium add-on make no sense to us.
    Can you help?

    Thanks in advance
    Tobi

    #11723
    Bartosz
    Keymaster

    Hi Tobias,

    Can you share a link to your site? We’ll try to figure out a solution.

    #11748
    Tobias Maigut
    Participant
    This reply has been marked as private.
    #11749
    Bartosz
    Keymaster

    Hi Tobias,

    The problem is with Fodler Gallery plugin. It is not compatible with RL required syntax. Unfortunatelly this plugin seems not being under developed anymore. But if you do small change in one of the files, you’ll be able to use it with recent RL, including PhotoSwipe addon.

    1. Go to Folder Gallery plugin on your site.
    2. Find foldergallery.php
    3. Go to line 449
    4. Change this part:

    $gallery_code .= '<a rel="lightbox[' . $lightbox_id . ']" data-lightbox-gallery="' . $lightbox_id . '" title="' . $thecaption . '" href="' . home_url( '/' . $folder . '/' . $pictures[ $idx ] ) . '">';

    into this:

    if ( function_exists( 'Responsive_Lightbox' ) && Responsive_Lightbox()->options['settings']['script'] === 'photoswipe' ) {
    	$image = getimagesize( ABSPATH . $folder . '/' . $pictures[$idx] );
    
    	$gallery_code .= '<a data-rel="lightbox[' . $lightbox_id . ']" data-lightbox-gallery="' . $lightbox_id . '" title="' . $thecaption . '" href="' . home_url( '/' . $folder . '/' . $pictures[$idx] ) . '" data-size="' . $image[0] . 'x' . $image[1] . '">';
    } else {
    	$gallery_code .= '<a data-rel="lightbox[' . $lightbox_id . ']" data-lightbox-gallery="' . $lightbox_id . '" title="' . $thecaption . '" href="' . home_url( '/' . $folder . '/' . $pictures[$idx] ) . '">';
    }

    And it should work fine.

    #11774
    Tobias Maigut
    Participant

    This is great support! Thank you so much, works perfect. Especially because i was depending on the folder gallery functionality in tis project, i’m very happy that you took the time to analyze a 3rd party plugin.

    kind regards from germany
    tobi

    #17917
    Benni
    Participant
    This reply has been marked as private.
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.