Tagged: borlabs, cookie, not blocked, Youtube
-
AuthorPosts
-
September 16, 2021 at 9:38 am #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.September 20, 2021 at 2:32 pm #1321639Hey 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,
IsmaelSeptember 20, 2021 at 5:52 pm #1321676First, 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?September 21, 2021 at 3:37 pm #1321790Its 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 ..September 22, 2021 at 2:54 am #1321841Hi,
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,
IsmaelSeptember 23, 2021 at 11:59 am #1321998Hi,
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!
September 24, 2021 at 6:33 am #1322115well – 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 withmidclick=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.September 27, 2021 at 3:41 pm #1322515September 27, 2021 at 8:38 pm #1322540Is 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>
September 30, 2021 at 2:10 pm #1322991October 6, 2021 at 10:14 am #1323725Must not have been so important after all.
- something like this placed on that page in a codeblock element:
-
AuthorPosts
- You must be logged in to reply to this topic.