Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1321168

    Hello,
    unfortunately my cookie blocker Borlabs does not block my youtube videos properly. I have added a button with a link to a video in my slider, Here a cookie is set without my consent. This is not DSGVO-compliant!
    Is there a way to block videos in the slider?
    If not, can you please suggest me another way how i can implement this.
    Thank you in advance.

    #1321639

    Hey Peter,

    Thank you for the inquiry.

    Youtube cookies are only saved in the local storage once the button is clicked, not on page load. In your privacy policy, you could notify the users that by clicking the slider button, they implicitly accepts Youtube’s terms of service.

    Unfortunately, we are not sure if Borlabs will be able to block videos inside the default lightbox. You may need to ask the plugin authors for additional assistance.

    Best regards,
    Ismael

    #1321676

    First, have you checked the box to load thumbnails locally?
    under Content Blocker – Youtube – this is besides your question a thing to mention.

    _______
    what kind of link is it – does it lead to a lightbox with the video? can you show me the site it concerns?

    #1321790

    Its a button in a slideshow.
    On top of my homepage https://www.uebler.com/ on the second slide image you can see the yellow button “Produktvideo”, which links to a youtube video. And although the youtube cookie is blocked, the video shows up in the lightbox. – Its necessary to block it also in this lightbox ..

    #1321841

    Hi,

    Have you tried any of these steps?

    // https://borlabs.io/kb/6-blocking-videos-borlabs-cookie/
    // https://borlabs.io/kb/8-create-content-blocker-borlabs-cookie/

    You can also set the video to open in a new tab by setting the Button Link Target? to “Open in a new window”.

    We will tag one of our developers to check the thread.

    Best regards,
    Ismael

    #1321998

    Hi,
    Yes I have tried all that, I have also set “Open in a new window” – still I can watch the video in the preview window although I have turned off the youtube cookie.
    Really don’t know what to do – my customer would like to open the video via this button.

    Thank you!

    #1322115

    well – borlabs offers an iframe option.

    • something like this placed on that page in a codeblock element:
      <div id="youtube-film" class="mfp-hide">[borlabs-cookie id="youtube" type="content-blocker"]<iframe width="100%" height="800" src="https://www.youtube-nocookie.com/embed/Uzjt3fvIlnY" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>[/borlabs-cookie]</div>
      The mfp-hide class will ensure that the div in the codeblock isn’t visible.
    • your button is linking to that ID: #youtube-film ( if you got more than one film – each got his own id ) for each a unique div with that id (could be in the same codeblock)
    • Give a custom-class to your button!
    • Then you had to make your own magnificPopup script to open that class in an inline popup ;)
      the custom-class as trigger with midclick=true, type= 'inline', delegate: 'a', as option

    Link
    maybe you include in that script outside that magnificPopup function
    $('.custom-class').find('a').addClass('no-scroll');

    PS: it will work – but with two buttons on that slider we had to find better selectors ! otherwise the second button will be triggered too.

    as mentioned above give a custom-class in this case to the slider

    
    function inline_popup_youtube_link() { 
    ?>
    <script type="text/javascript">
    (function($){
    $(window).on('load', function () {  
    	$('.custom-class').find('a[href*="youtube"]').addClass('no-scroll');
    	$('.custom-class').magnificPopup({
    		delegate: 'a[href*="youtube"]',
    		type:'inline',
    		midClick: true,
    	});
     });   
    })(jQuery);
    </script>
    <?php 
    }
    add_action('wp_footer', 'inline_popup_youtube_link', 9999);

    PPS: because the link isn’t really a youtube link ( remember the link goes to that div with ID: #youtube-film )
    if you like to use it on other places – the ID must have a string with “youtube” maybe you can name them #youtube-1, #youtube-2 etc.

    OR choose as selector: for the anchor : a[href^="#"] ( replace it on both lines ) – it means the link starts with #
    But then the second button in the slider must not be an anchor link of the page. This would also fall into the trigger.
    ________
    Das dort die Vorschaubilder von Youtube gezeigt werden in einer lokalen Version ( daher meine Frage oben ) – wird bei dir nicht der Fall sein !
    Es wird das Standard Borlabs Preview image gezeigt werden.
    Da habe ich ordentlich borlabs und youtube kenntnisse mit eingebracht und eigene Scripte geschrieben.

    #1322515

    Hi,

    Thanks so much for sharing @Guenni007 :)

    Best regards,
    Yigit

    #1322540

    Is it too complicated for you to implement?
    maybe this is better – ( as mentioned above – the second button had to be not an anchor link leading to an id of a color-section or something like this )

    function inline_popup_youtube_link() { 
    ?>
    <script type="text/javascript">
    (function($){
    $(window).on('load', function () {  
    	$('.custom-class').find('a[href^="#"]').addClass('no-scroll');
    	$('.custom-class').magnificPopup({
    		delegate: 'a[href^="#"]',
    		type:'inline',
    		midClick: true,
    	});
     });   
    })(jQuery);
    </script>
    <?php 
    }
    add_action('wp_footer', 'inline_popup_youtube_link', 9999);

    Borlabs can block iframes – see : Borlabs – Content Blocker – Youtube :

    This is the shorcode i put inside a div – and set for the div a class : mfp-hide
    This class is the magnificPopup class that is set to display: none
    With that code above – every anchor link that starts with “#” inside that custom-class ( you can have every other name for it ) will open in a lightbox. In this case it is that youtube film – blocked by borlabs cookie til you consent.
    The button itself is linking to manual #youtube-film ( this had to correlate with the div ID that you like to open )

    <div id="youtube-film" class="mfp-hide">[borlabs-cookie id="youtube" type="content-blocker"]<iframe width="100%" height="800" src="https://www.youtube-nocookie.com/embed/Uzjt3fvIlnY" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>[/borlabs-cookie]</div>
    
    #1322991

    Hi,

    Thanks again @guenni007 :)

    Best regards,
    Yigit

    #1323725

    Must not have been so important after all.

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