Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #605582

    I have a problem using the AJAX Portfolio. It works great with slideshows, but when I use the ‘Define Custom Link’ and link to a Vimeo video there are a couple of issue.

    Main problem is that the video Lightbox opens over the portfolio featured image which could be way down the window in a big portfolio grid, but the window slides back to the top of the page to show the AJAX preview. This results in the Lightbox being off screen, below the viewable area. A great solution would be to disable the AJAX preview when Define Custom Link is selected. OR to have the Lightbox always open over the AJAX preview area at the top of the portfolio grid- not over the portfolio thumbnail.

    Second, when you open a slideshow over the AJAX preview area and use the large navigation arrows to the far left and right of the screen, the portfolio items get stuck on videos. That is, they will move from one portfolio item to another until they open a video, then they will only open other videos in the grid and will skip over any ‘image’ portfolio items that didn’t use Define Custom Link. This isn’t a major issue, and I will probably just hide the large navigation arrows so a user has to close the Lightbox to move to the next portfolio item.

    The AJAX preview is a great feature and I hope to keep using it as the Open in Lightbox mode doesn’t allow multiple preview images to be viewed.

    #605968

    Hi,

    Open js/avia.js and look for line:

    container.on("click", "a", methods.load_item);
    

    Replace it by this:

    container.on("click", "a:not([href*=vimeo.com])", methods.load_item);
    

    Regards,
    Josue

    #606392

    Thanks Josue

    I didn’t find that line in avia.js but I did find it in shortcodes.js. I changed it there but this stopped all AJAX previews from working, just links to portfolio item.

    #606959

    Hi!

    We checked the site but there’s an error. Try to replace the code above with this:

    container.on("click", "a:not([href*=:"vimeo.com"])", methods.load_item);
    

    Best regards,
    Ismael

    #607979

    Thanks, site is running again now, but that edit didn’t work. This time stopped all Portfolio featured images loading in the Grid, plus links directly to item on all portfolio items bypassing AJAX previews.

    #608013

    After looking again at this i’m afraid it would require an extensive modification to the theme, unfortunately that’s beyond our support scope. You can request a customisation quote from a third-party provider here.

    Regards,
    Josue

    #608020

    Kind of disappointing Josue, seems to me the AJAX preview should behave this way or it is not really usable to display images and videos. Plus I don’t really want to pay again to get this working as it was already purchased as part of the theme.

    Maybe a better approach would be to flag this as a bug that could be rectified in a future release?

    #608170

    Ignore my last reply, i think i managed to find a workaround, check the gallery page please.

    Regards,
    Josue

    #608581

    Josue, you are my hero! looks great!

    So would I be right in thinking the final edit was

    //container.on("click", "a", methods.load_item);
    
    			container.on("click", "a:not(.mfp-iframe)", methods.load_item);
    • This reply was modified 8 years, 7 months ago by cbrssict.
    #608586

    Correct, that would be it. Also if you’re using a child theme you can have a version of js/shortcodes.js in your child theme directory by adding this to functions.php:

    function change_shortcodesjs() {
       wp_dequeue_script( 'avia-shortcodes' );
       wp_enqueue_script( 'avia-shortcodes-child', get_stylesheet_directory_uri().'/js/shortcodes.js', array('jquery'), 2, true );
    }
    add_action( 'wp_enqueue_scripts', 'change_shortcodesjs', 100 );
    #921270

    Can anyone help me find a more permanent solution this issue. The hack listed above has been working for the last year, until my last Enfold update. But looks like shortcodes.js no long uses the same code to trigger a lightbox.

    Just to repeat the original issue was with a Portfolio link using the “Define Custom Link” Option to open a video in a Lightbox
    When selected the Lightbox opens relative to the page position, but the viewable area returns to the top of screen, meaning the Lightbox is off the bottom of the window.

    Would be awesome if a permanent solution could be implemented, as it would seem the option is unusable without the hack above (which obviously now no longer works).

    #921985

    Hi,

    Do you have version 4.2.5? Please check if the config-templatebuilder > aviashortcodes > portfolio folder exists. If you can see the folder, edit the portfolio.js file then look for this code around line 279.

    container.on("click", "a", methods.load_item);
    

    You can do the previous modification.

    Best regards,
    Ismael

    #921989

    Hi Ismael
    Yes I see the Portfolio Folder, will try the edit… I’m running 4.2.5

    • This reply was modified 6 years, 8 months ago by cbrssict.
    #922002

    Didn’t seem to work. Edited portfolio.js to

    			//container.on("click", "a", methods.load_item);
    			container.on("click", "a:not(.mfp-iframe)", methods.load_item);

    But this hasn’t fixed the issue as it was previously.

    #922004

    Also didn’t work…

    
    container.on("click", "a:not([href*=:"vimeo.com"])", methods.load_item);
    
    • This reply was modified 6 years, 8 months ago by cbrssict.
    #922725

    Hi,

    Thank you for the update. Did you install a cache and minification plugin? Please make sure that the scripts and stylesheets are refreshed. Or post the login details in the private field so that we can test it.

    Best regards,
    Ismael

    #923497

    Don’t think it is a cache issue. Please see login dets.

    • This reply was modified 6 years, 8 months ago by cbrssict.
    #924374

    Hi,

    Thank you for the info.

    You were probably looking on a cached version of the page. Please remove browser cache or do a hard refresh before checking the page. The items with videos open in a lightbox and no longer trigger the portfolio ajax.

    Best regards,
    Ismael

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