Viewing 30 posts - 1 through 30 (of 31 total)
  • Author
    Posts
  • #462111

    Hi,

    I’m trying to have a lightbox show up when an image is clicked in a masonry gallery. Instead it takes me to the image. Is this possible? Please take a look at the link.

    Thanks.

    sl

    #462352

    Hey slui!

    Thank you for using Enfold.

    Please make sure that the Lightbox Modal Window is enabled. You can find that option on Enfold > Theme Options panel. And if you have the chance, please update the theme to the latest version, 3.2.1.

    Best regards,
    Ismael

    #462386

    Hi Ismael,

    Lightbox Modal Window is already enabled.

    sl

    #462607

    Hey!

    In the masonry theme options, is the Image Link set to lightbox? If it is set but still not working, please try to deactivate the plugins.

    Best regards,
    Ismael

    #463120

    Hi Ismael,

    The masonry gallery that I’m looking at/using is located under CONTENT and not under MEDIA ELEMENTS. The one under CONTENT does not have the lightbox linking option.

    The reason I selected the masonry gallery under CONTENT is because I like the way it has the “Load More” effect. This version of pagination does not RELOAD the page like the one under MEDIA ELEMENTS.

    Do you know of a way to replicate the same “look and feel” of the masonry gallery under CONTENT using the masonry gallery under MEDIA ELEMENTS?

    Thanks.

    sl

    #463715

    Hi Samuel,

    No that’s not possible because, in order to have pagination (numbered or load more) the content shown has to be some sort of “post” type content, the Masonry Gallery (Media) is built with simple images. So you’d need to rely on the Masonry element (Content), you can edit each Portfolio Item custom link to have these open as lightbox – http://screencast.com/t/rPrLkb0VBw0

    Regards,
    Josue

    #464178

    Thanks Josue,

    That seemed to work nicely. However, there are now 2 issues. The first is that not all the images are being displayed properly in the masonry grid. and secondly, it is pulling up images that are not within the category called “Hamilton Gallery” when you are in lightbox mode.

    1. The gallery is also not showing the grid completely.

    http://www.tiikoni.com/tis/view/?id=d887f13

    2. After clicking “load more” and if you click on one of the images, a lightbox will show up. However, you will see that the lighbox will show more images than just the ones in the gallery. I’ve specified a specific category and here are the settings that I have used:

    http://www.tiikoni.com/tis/view/?id=c33038c

    Thanks

    #464537

    Hi,

    Open /config-templatebuilder/avia-shortcodes/masonry_entries.php and look for line:

    $items .= 	"<{$html_tags[0]} id='av-masonry-".self::$element."-item-".$entry['ID']."' class='{$class_string}' {$linktitle} {$markup}>";
    

    Replace it by this:

    $items .= 	"<{$html_tags[0]} id='av-masonry-".self::$element."-item-".$entry['ID']."' data-rel='masonry-".self::$element."' class='{$class_string}' {$linktitle} {$markup}>";
    

    Regards,
    Josue

    #465288

    Hi Josue,

    I’m concerned with this solution not being future-proof. Is there another way of doing this? Thanks.

    sl

    #465289

    Hi,

    Did it work? you can do this to replace ALB shortcodes from a child theme.

    Regards,
    Josue

    • This reply was modified 8 years, 10 months ago by Josue.
    #465350

    Hi Josue,

    I already have the ALB shortcodes implemented in the functions. I also copied the masonry_entries.php file into the child theme and made the change to the code.

    Unfortunately, it did not work. When I click on an image after “load more” is clicked, I see 16 images instead of 10 images from the gallery. It is still including images from other gallery.

    sl

    #466133

    Any thoughts to this?

    #466543

    Anybody can respond to this?

    #467397

    Hey!

    Did you place the masonry_entries.php code inside the “shortcodes” folder? This code will check for the ALB elements in the “shortcodes” folder:

    add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
    function avia_include_shortcode_template($paths)
    {
    	$template_url = get_stylesheet_directory();
        	array_unshift($paths, $template_url.'/shortcodes/');
    
    	return $paths;
    }

    This process is still not future-proof because we might add or fix codes on the original file that will then be ignored because you have an existing file inside the child theme folder. The best thing to do is to create a change log or a note about this modification in case you update the theme.

    Regards,
    Ismael

    #467421

    Hey!

    In case anyone else has a similar issue, this was not necessary after all, the issue was related to the avia_activate_lightbox, the fix was in line 895 of js/avia.js:

    groups			:	['.avia-slideshow', '.avia-gallery', '.isotope', '.post-entry', '.sidebar', '#main', '.main_menu'], 
    

    Changed to:

    groups			:	['.avia-slideshow', '.avia-gallery', '.isotope', '.post-entry', '.sidebar', '.main_menu'], 
    

    Regards,
    Josue

    #469229

    Thanks Josue for this solution.

    Is there anyway to make this future proof for the moment?

    I copied the avia.js file with the modification and place it in the JS directory in the child theme and it did not work.

    sl

    • This reply was modified 8 years, 10 months ago by slui.
    #469231

    In addition, I found out that the number of images shown in the lightbox is not reflected of the number shown on the screen at the time (before you press “Load More”).

    See screenshot: http://www.tiikoni.com/tis/view/?id=2476473

    The screenshot shows total number of pictures to be 6 when in reality there are 7 images on the page.

    Thanks.

    • This reply was modified 8 years, 10 months ago by slui.
    #469285

    Hi!

    Place this code in functions.php to load child js/avia.js:

    // Replace avia.js
    function change_aviajs() {
       wp_dequeue_script( 'avia-default' );
       wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true );
    }
    add_action( 'wp_enqueue_scripts', 'change_aviajs', 100 );
    

    Regarding the number that’s expected, that shows the current number of images found in that precise moment, the non-loaded one don’t exist yet, you can use the following CSS code to hide it:

    .mfp-counter{
    display: none;
    }

    Best regards,
    Josue

    #469389

    Hi Josue,

    If you look at the images on the page, you will see that the counter (from the lightbox) showing is one less than is actually being displayed on the site. There should 7 images in the lightbox and not 6. There are 7 images showing before you press the Load More button.

    The other tip worked beautifully. Thanks.

    sl

    #469394

    Gallery before lightbox – Shows 6 pictures at the moment
    http://www.tiikoni.com/tis/view/?id=ec2a65e

    Lightbox when clicked on a single image – Shows only 5 pictures to display.
    http://www.tiikoni.com/tis/view/?id=f27b112

    #469942

    Hey!

    Can you pass me the link to that page?

    Best regards,
    Josue

    #469971

    Sure…take a look at the private info

    #469988

    Hi Samuel!

    This item is not linking to a .jpg image – http://screencast.com/t/7etOfhLwaTHK

    Regards,
    Josue

    #470000

    Okay..it has now been resolved….thanks so much..

    #470002

    You are welcome, glad to help :)

    Regards,
    Josue

    #516912

    Would love to do this, but can’t get it to work.

    What I did. In my child theme I created a JS folder and then.

    line 895 of js/avia.js:
    ‘groups: [‘.avia-slideshow’, ‘.avia-gallery’, ‘.isotope’, ‘.post-entry’, ‘.sidebar’, ‘#main’, ‘.main_menu’],’
    Changed to:
    groups: ['.avia-slideshow', '.avia-gallery', '.isotope', '.post-entry', '.sidebar', '.main_menu'],

    Place this code in functions.php to load child js/avia.js:

    // Replace avia.js
    function change_aviajs() {
       wp_dequeue_script( 'avia-default' );
       wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true );
    }
    add_action( 'wp_enqueue_scripts', 'change_aviajs', 100 );
    #516913

    Hi,

    Can you post the link to your website please?

    Regards,
    Josue

    #516914

    http://www.dutchpixel.nl

    Simply just want to show images with categories. And when people click on the categories the images are sorting. When they click on a image it opens in a lightbox :)

    Thanks in advance!

    #516932

    I’ve actually solved it! Thanks to this topic!

    https://kriesi.at/support/topic/lightroom-in-portfolio-masonry-or-sortable-masonry-gallery/#post-361857

    Open up /enfold/config-templatebuilder/avia-shortcodes/masonry_entries.php and change line 704 from this.

    $this->loop[$key]['url'] = get_permalink($id);

    To this.

    $this->loop[$key]['url']			= wp_get_attachment_image_src(get_post_thumbnail_id($id), apply_filters('avf_avia_builder_masonry_lightbox_img_size','large'));
    $this->loop[$key]['url'] = reset($this->loop[$key]['url']);

    That will have the masonry element images open in lightbox instead of linking to the post.

    But I’m actually looking for a more future proof update. Any idea’s?

    #517771

    Hi!

    glad it’s working for you!
    Try this for a solution using child theme: https://kriesi.at/support/topic/is-it-possible-to-modify-files-in-enfold-child/#post-218226

    Regards,
    Andy

Viewing 30 posts - 1 through 30 (of 31 total)
  • The topic ‘Masonry Gallery with Lightbox – Possible?’ is closed to new replies.