Tagged: 

Viewing 24 posts - 1 through 24 (of 24 total)
  • Author
    Posts
  • #1110132

    The only way that I know of to trigger a lighbox display is by clicking on an image within a gallery. My customer wants to display a set of images, each representing a gallery. When the viewer clicks on an image, the gallery will display in a lightbox with auto-rotation. Here is an example of the first page:

    When the visitor clicks on “Before and After Stained Kitchen Cabinets” can I make a lightbox appear with a gallery of images that auto-rotate?

    #1110140

    well maybe it is possible to have that by having your own lightbox activation script:
    it is loaded as avia-snippet-lightbox.js – but you can have instead an own child-theme edited script copy.
    This could be done by a callback setting like:

    callbacks: {
    	open: {
    	   setInterval(function() {
    	        $.magnificPopup.instance.next();
    	   }, 5000);
    	}
    }

    maybe a mod knows how to implement that on the script ;)

    #1110141

    this is better:
    try this in child-theme functions.php:

    function set_interval_for_lightbox(){
    ?>
    <script>
    (function($) {
    setInterval(function() {
    	if(typeof($.magnificPopup.instance) != 'undefined') {
    		$.magnificPopup.instance.next();
    	}
    }, 6000);
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'set_interval_for_lightbox');

    6000 is the interval in milliseconds

    but i do not know (yet) how to link directly from the one gallery to a “lightbox gallery slideshow” on the other page.
    The code above will work on every sub-page like: http://fvs.768.myftpupload.com/before-after-stained-kitchen-cabinets/

    #1110144

    Can the lightbox auto rotate through the images?

    #1110220

    Hi,

    There is no functionality for that in the theme unfortunately and I’m not aware of any solutions which would enable that either.

    Best regards,
    Rikard

    #1110224

    try that code please : https://kriesi.at/support/topic/can-i-make-the-lightbox-auto-rotate-and-trigger-with-single-link/#post-1110141

    and press one of your images on : http://fvs.768.myftpupload.com/before-after-stained-kitchen-cabinets/

    But yor heading tells two requests – the one is the autorotation of a “lightbox slideshow”
    the other is to link from your first masonry directly to the lightbox of the other page.

    for first see here in action: https://webers-testseite.de/gallery/

    #1110247

    for the second request – look into your source code and see what ID the first image got- on that page above it is : #av-masonry-1-item-125

    function start_with_clicked_state(){
    ?>
    <script>
    (function($) {
    $(window).load(function() {
        setTimeout(function() {
            $('#av-masonry-1-item-125').trigger('click'); 
         }, 1000);
     });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'start_with_clicked_state');

    see here my example page: https://webers-testseite.de/gallery/
    with both codes above : after 1sec the lightbox starts – every 6sec the image will load the next one.

    so you do not have to do something on the starting page: http://fvs.768.myftpupload.com/kitchens/
    just see the ID of the first image you have on that newly opend one (http://fvs.768.myftpupload.com/before-after-stained-kitchen-cabinets/)

    #1110470

    the only thing that i can not imagine – is the the autoplay will work for paginated galleries.
    if you can show all of your images on one page it will work like here: https://webers-testseite.de/gallery/

    #1110771

    Aren’t you willing to accept or try a solution from a non moderator? ;)
    if there are questions – tell me

    #1110833

    Hi bethperkins,

    Did you get it working with Guenni007’s suggestions or do you need more help?

    Best regards,
    Victoria

    #1111013

    I’m going to try it today. As I understand, I need to add two functions to my child theme to make this work.
    Thanks!
    Beth

    #1111014

    Question, will i need to create the second function for every gallery? This sounds overly complex. I’m thinking of using this gallery which sounds like it will do everything I need out of the box. https://enviragallery.com/

    #1111204

    yes – on every gallery you like to start automatically – and you only have to add then analog lines to :

    $('#av-masonry-1-item-125').trigger('click');

    or change it to (but then all masonry galleries will do the auto start.) :

    function start_with_clicked_state(){
    ?>
    <script>
    (function($) {
    $(window).load(function() {
        setTimeout(function() {
             $('a.av-masonry-entry.lightbox-added:first-of-type').trigger('click');
         }, 1000);
     });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'start_with_clicked_state');
    #1111206

    some words to that plugin. Seems to be a good one. But:
    ask the developer if it is compatible with Enfold – or search the internet for some hints if it is working with enfold.
    This plugin – does it work with its own lightbox script. Can you use both lightbox (magnific popup from Dmitry Semenov) and that of your plugin?
    Etc pp.

    ;)

    https://enviragallery.com/docs/enfold-theme-enviras-automatic-gallery/

    #1111296

    Hi,

    Thanks for helping out @guenni007, it’s much appreciated :-)

    Best regards,
    Rikard

    #1111498

    Thank you @guenni007! The function to make the lightbox scroll automatically works great! I’m going to try to convince my customer to start the lightbox by clicking a pic in the gallery instead of the auto link but I’ll try your suggestion is I need to

    Thanks for your help!

    Beth

    #1111511

    @guenni007! I made progress with your suggestions. Thanks! Another issue with the masonry display and lightbox is that captions are used in the masonry display and the lightbox uses titles. Do you have a workaround for this? I want the lightbox to use the caption entered in the masonry gallery – which sounds obvious

    #1112007

    Hi bethperkins,

    Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Victoria

    #1112290

    can you try this in child-theme functions.php:

    function masonry_title_fix(){
    ?>
    <script>
    (function($){
        $(window).load(function() {
          $('a.av-masonry-entry.lightbox-added').each(function(){
                var lin = $(this).find('.av-masonry-entry-content').text();
                $(this).attr('title',lin);
            });
        });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'masonry_title_fix');

    but you had to choose to show on the gallery both : title and excerpt (that is the entered Caption)
    If you only want to have under the gallery images the title – but on lightbox the caption – just do this to quick css:

    .av-masonry-entry-content.entry-content {
        display: none !important;
    }

    see here: https://webers-testseite.de/gallery/

    #1112454

    @guenni007 Thank you! You’re amazing. Working!

    #1112473

    Hi bethperkins,

    Great, I’m glad that you got it working and our big thanks goes out to @guenni007 for helping out. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #1121677

    @guenni007 Thank you for your help modifying the lightbox to autoamtically scroll through images. Works great. Any chance you could help me to make it pause on hover?

    #1122930

    This doesn’t work for me. I have another thread with this issue. We built many client websites with Enfold using the Masonry Image Gallery Lightbox with captions. All our clients loaded many images into the galleries, added the Caption and not the Titles as the titles were the uploaded image name. All our clients approved the website and they worked great for a time. With the new update, someone decided that Captions (the normal place to add image caption) were not right and they switch everything to Lightbox Titles. Now all the websites we got approvals for and we displaying just find are broken.

    Most of these websites are galleries and museums. They don’t have captions now!

    Does anyone have a fix that works?

    Oh and another thing. If you notice in the Masonry Gallery when you select images, under every image, there is a field to Enter a Caption. If you use this field to enter a caption, IT DOESN’T DISPLAY. So even Enfolds own system doesn’t work since it was switched from displaying caption to titles.

    You can see my documentation in my thread here. This issue will become a bigger problem as more users will become aware.

    • This reply was modified 5 years, 3 months ago by fulanoinc.
    #1122995

    Hey!


    @fulanoinc
    : We replied in your thread. Please continue there.

    // https://kriesi.at/support/topic/lightbox-gallery-captions-not-showing/#post-1122994

    Regards,
    Ismael

Viewing 24 posts - 1 through 24 (of 24 total)
  • You must be logged in to reply to this topic.