Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author bradvin

    (@bradvin)

    instead of adding a rel of just “lightbox”, add a rel that is compatible with prettyPhoto, like “prettyPhoto[pp_gal]”

    Let me know if that works for you

    Thread Starter David 279

    (@david-279)

    I tried

    add_filter(‘foogallery_attachment_html_link_attributes’, ‘add_foogallery_link_rel’, 10, 3);

    function add_foogallery_link_rel($attr, $args, $attachment) {
    $attr[‘rel’] = ‘prettyPhoto[pp_gal]’;
    return $attr;
    }

    But that doesn’t work at all

    Sorry for this I only started working with wordpress a couple of months ago and I’m really not experienced at modifying the various .php type files, I’m guessing I need to attach lightbox but then do something to get the prettyPhoto gallery to work

    I found it worked fine for me however. What put me off using the dfactor plug-in was when I used there fancybox option which was the best for what I need it turned out have very jerky animation between each image.

    In the end after look at loads of plug-ins. I end up using myfancybox. While it does not have a fancy options menu and rather works just from editing the options in it’s php file it worked very well. Not only did it give me the type of image pop-up I wanted but at the same time found i could stop right click on my images and add a water mark saving the need for me to find two more plug-ins and yet more code. As i all of this is supported in fancybox Jquery V2 code. Which nearly nearly all of these types of plug-ins are based on, but with half the options taken out.

    Plugin Author bradvin

    (@bradvin)

    @david 279,

    Looking at the lightbox code, it is looking for the following selector:

    $(‘a[rel*=”‘+rlArgs.selector+'”]’).prettyPhoto({

    And rlArgs.selector = “lightbox” on your page, so change the code to be:

    function add_foogallery_link_rel($attr, $args, $attachment) {
      $attr['rel'] = 'prettyPhoto[lightbox]';
      return $attr;
    }

    I’m also trying to use Responsive Lightbox by dFactory with FooGallery.
    The given solution above is not very clear to me.

    Could you please tell me how and where exactly to add Responsive Lightbox to FooGallery.

    Thanks in advance!

    Here’s what I did in order to make FooGallery work with SwipeBox in dFactory’s Responsive Lightbox.

    Assuming you have both plugins installed go to the Responsive Lightbox settings and turn ‘Conditional loading’ off

    then add the following action to your child theme or theme:

    function add_foogallery_link_rel($attr, $args, $attachment) {
    	$attr['data-rel'] = 'lightbox';
    	return $attr;
    }
    
    add_filter('foogallery_attachment_html_link_attributes', 'add_foogallery_link_rel', 10, 3);

    Thanks @madla, it works for me!

    Hi,
    @madla: it’s not working anymore. In which file did you add the code?

    Thanks

    Nevemind my question, it must be added to the functions.php.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Foo gallery and responsive lightbox by dfactory’ is closed to new replies.