Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1138795

    Hi there!
    In this post you described how to use the video shortcode in the ajax preview (Setting: Show only preview text). Doesn’t this solution work any more? The shortcode works fine in the Single Portfolio item, but not in the ajax preview …
    Do you have an idea?
    Thanks
    Bernd

    #1139681

    Hey profil77,

    This is happening because over the Ajax Preview it is not registered.
    To do this would require a lot of modification to be applied.

    Best regards,
    Basilis

    #1139791

    Thank you, Basilis. Are you sure something is not registered? The video shortcode is displayed in the toolbar of the Ajax Preview area. And if I test a video as video slide of the Easy Slider shortcode, it works. I also think Josue’s advices are very helpful and very reliable. Why shouldn’t his information in the post be correct?

    #1141181

    Hi,

    Sorry for the confusion.

    You may need to use this filter to properly execute the video shortcode in the portfolio preview.

    
    /**
     * Allow to force execution of shortcodes e.g. for plugins who call shortcode via an ajax call.
     * Enfold uses this to execute the shortcode for modal popup preview in backend
     * 
     * @since 4.5.7.2
     * @param boolean
     * @param aviaShortcodeTemplate $obj_sc
     * @param array $atts
     * @param string $content
     * @param string $shortcodename
     * @param boolean $fake
     * @return boolean				true if sc should be executd regardless of page structure - same as popup preview
     */
    function avf_custom_exec_sc_only( $exec_sc_only, $obj_sc, $atts, $content, $shortcodename, $fake )
    {	
    	return true;
    }
    
    add_filter( 'avf_alb_exec_sc_only', 'avf_custom_exec_sc_only', 10, 6 );
    

    Best regards,
    Ismael

    #1141257
    This reply has been marked as private.
    #1142096

    Hi,

    Thank you for the update.

    The issue is that the video is not being initialized because the portfolio preview and its content is only created when you click on the designated item in the grid. This little snippet should re-initialize the video once the portfolio preview is visible.

    add_action('wp_footer', function() {
    	?>
    	<script>
    		(function($) {
    			$('body').on('av_resize_finished', function() {
    				$('.av-lazyload-immediate .av-click-to-play-overlay').trigger('click');
    			});
    		})(jQuery);
    	</script>
    	<?php
    });
    

    Add it in the functions.php file.

    Best regards,
    Ismael

    #1142156

    Thank you very much, Ismael.
    Please take a look at the frontend, the page with the portfolio grid. Whether with or without this snippet, the shortcode below the video shortcode is not shown in the Ajax preview, but in the footer of the page. Is it possible that the shortcode itself doesn’t work properly?
    Best regards
    Bernd

    #1142608

    Hi,

    Thank you for the update.

    We found an unclosed column shortcode in the preview editor, but the result is still the same after fixing it. The content is thrown out of the AJAX preview, but we could not figure out why. Did you add any customizations in the theme aside from those suggested above? Can we deactivate the plugins temporarily?

    Where did you add the “avf_custom_exec_sc_only” filter? We can’t find it in the functions.php file.

    Best regards,
    Ismael

    #1142835
    This reply has been marked as private.
    #1143225

    Hi,

    Thank you for the update.

    We are able to reproduce the issue on our installation, but we can’t figure out why the “av-click-to-play-overlay” is being rendered outside the AJAX preview. We’ll forward the issue to the dev team. Please wait for their response. For now, please try to embed the video using an iframe tag.

    // https://www.w3schools.com/html/html_youtube.asp

    Best regards,
    Ismael

    #1143358

    Thanks Ismael,
    for the moment we’ll solve the issue with an additional image, which links to the video, opening it in a lightbox.
    Best regards
    Bernd

    #1143632

    Hi Bernd,

    Great, I’m glad that you found a solution and thanks for the update. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #1143761

    Hi Rikard.
    We are waiting for a solution from your developers and for the next theme update. So you may close the topic.
    Best regards
    Bernd

    #1143966

    Hi,

    If you need further help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

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