• Resolved Troglos

    (@troglos)


    Hi, Youtube videos inserted in a swipebox gallery are not blocked.
    Only videos embedded in regular pages are blocked.
    How can I fix this?

    Thank you

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor jarnovos

    (@jarnovos)

    Hi @troglos,

    Could you provide a link to the plugin you use to place these videos / ‘swipebox’ galleries? I can check if we already have an integration, or if we might be able to add support for it in an upcoming release.

    Kind regards,
    Jarno

    Thread Starter Troglos

    (@troglos)

    The swipebox plugin is this https://www.ads-software.com/plugins/easy-swipebox/

    I use a repeater field with ACF to create the gallery

    The code I use is this

    <?php if ( have_rows( 'elenco_video' ) ) :?>
      <div class="grid elenco_video">
       <?php $video = 1; ?>
        <?php while ( have_rows( 'elenco_video' ) ) : the_row(); ?>
         <div class="col-33 tab-50 sma-100 item">	
          <?php 							
    	//second false skip ACF pre-processcing
    	$url = get_sub_field('embed_video', false, false);
    	//get wp_oEmed object, not a public method. new WP_oEmbed() would also be possible
    	$oembed = _wp_oembed_get_object();
    	//get provider
    	$provider = $oembed->get_provider($url);
    	//fetch oembed data as an object
    	$oembed_data = $oembed->fetch( $provider, $url );
    	$thumbnail = $oembed_data->thumbnail_url;
    	$iframe = $oembed_data->html;
           ?>
           <a href="<?php echo $url;?>" rel="group-<?php echo $video;?>"><img src="<?php echo $thumbnail;?>" alt="" /><svg class="icon icon-youtube"><use xlink:href="#icon-youtube"></use></svg></a>
        </div>
        <?php $video++; endwhile; ?>
      </div>
    <?php endif; ?>
    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @troglos,

    You could start by trying whether enabling the “Cookie blocker for AJAX loaded content” option has any effect on the current behavior. You can do this by enabling “Advanced features” under Complianz > Settings, then scrolling down to the Advanced features section to enable this option.

    If not, perhaps you could export your ACF Pro fields and send these to us? I can then create a Feature Request and add it to our backlog. This would allow us to set the implementation up ourselves, so that we can look further into it.

    Kind regards,
    Jarno

    Thread Starter Troglos

    (@troglos)

    “Cookie blocker for AJAX loaded content” doesn’t work (emptied cache etc..).
    You can check it in the same page linked above.

    I don’t think it’s an ACF problem, because if I insert the same video in an ACF block it works fine. It’s only in the swipebox modal that it doesn’t work.
    Anyway this is the export https://www.dropbox.com/s/lo3ckietbr2qu6b/Video%20gallery.json?dl=0

    Thank you

    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @troglos,

    While we haven’t been to recreate your ACF & Easy SwipeBox set-up on our own environments yet, which makes testing rather challenging, we did create a version of the plugin with an (experimental) integration for this setup, that you can test.

    You can download it from the GitHub link attached below. Make sure to rename the folder back to ‘complianz-gdpr’ after downloading it, then add the renamed to a ZIP archive again, before uploading it as a plugin to WordPress.

    https://github.com/Really-Simple-Plugins/complianz-gdpr/tree/easy-swipebox

    Kind regards,
    Jarno

    Thread Starter Troglos

    (@troglos)

    Thank you @jarnovos, the experimental plugin works fine.

    Now Youtube and Vimeo videos in the modal window are blocked.

    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @troglos,

    Great, thank you for confirming.

    I would like to note that this integration won’t be included in the Complianz plugin by default. Therefore, I have created a MU Plugin for this integration.

    This would allow you to keep updating Complianz to newer versions, without losing the integration code.

    You can place the code attached on the below GitHub link as a .PHP file in the folder /wp-content/mu-plugins/ on your website for the integration to take effect.

    https://gist.github.com/jarno-vos/a8ad53cfd62f1f7e00644e0240014e85

    Kind regards,
    Jarno

    • This reply was modified 2 years, 5 months ago by jarnovos.
    Thread Starter Troglos

    (@troglos)

    OK thank you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Youtube videos in swipebox not blocked’ is closed to new replies.