Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Run filter on Video Embed in Gridder to content block video embed via Borlabs

Run filter on Video Embed in Gridder to content block video embed via Borlabs

Scheduled Pinned Locked Moved General Discussion
12 Posts 3 Posters 385 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    michaelmaeder
    wrote on last edited by
    #1

    Hi,

    I have been fiddeling around with this for a moment, but cant seem to find a working solution. Is there a good way to filter the video embed in the gridder to run a shortcode on it?

    I would like to content block video embeds via Borlabs consent management plugin, which provides a shortcode, since Borlabs does not seem to recognise embeded videos in gridder out of the box.

    Example page: https://bit.ly/3wM3SYX

    Any pointers are much appreciated.

    My best,
    MM

    1 Reply Last reply
    0
    • M Offline
      M Offline
      michaelmaeder
      wrote on last edited by
      #2

      I have tried instead to add a video with the a shortcode field, using the content blocking short code and iframe embed code.
      When I do that the content block is properly included before loadinng the video, but the JS fails when trying to unblock the video. (throwning a Error: Syntax error, unrecognized expression: # on the link, which is supposed to be triggered by JS and has a # in the href attribute).

      On a more general note: Does Laytheme support any kind of content blocking plugin? The implications of DSGV clearly dont allow for embed of external meadia without active consent, so content blocking is crucial for legal reasons. Would be good to understand what the approach of Laytheme is on this issue.

      Thanks,
      MM

      1 Reply Last reply
      0
      • RichardR Offline
        RichardR Offline
        Richard
        Global Moderator
        wrote on last edited by
        #3

        Dear @michaelmaeder

        I have recently replied on this thread:
        http://laythemeforum.com:4567/topic/6887/bug-with-borlab-shortcodes/3

        However that may be another issue within the Borlabs bug? would be great to know if there are two.


        Talk soon and have a wonderful day Michael ✨
        Sincerely
        Richard
        1 Reply Last reply
        0
        • M Offline
          M Offline
          michaelmaeder
          wrote on last edited by
          #4

          Thanks, as far as I can tell the link issue is the same jQuery Error, unrelated to if this is the content blocker short code or the borlabs settings shortcode. Any link with href="#" seems to trigger this issue when clicked.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            michaelmaeder
            wrote on last edited by
            #5

            Upon further investigation the suggested earlier version of LayTheme did not fix the link error for the content blocker. Also I have had another issue. Earlier I though instead of using the included Video element for the Gridder (which is not recognised as a video through Borlabs) I could use the shortcode elment instead to embed a video. But it did not work for the video to be responsive. I have tried to copy over the video markup from a video element and wrap that around a Borlabs content blocker shortcode, btu the completely messed up the layout.

            So as it stands I am looking at two issues:

            • Any links from Borlabs are not working in LayTheme (these are JS links that trigger the above jQuery error in LayTheme)
            • The content blocker function of Borlabs does not cover the video element of the Gridder and cannot be replaced with a shortcode instead.

            So I am looking for a way to circumvent the JS error through Borlabs links as well as a filter or some other way to inject the shortcode for the borlabs content blocker for video embeds.

            Any pointers are more than welcome. I guess I am also willing to work with any other content blocking plugin that works with Laytheme. In order to work within a the law (DSGVO / GDPR) embeds of this kind (YouTube / Vimeo) always require proactive consent, so I would hope to support any kind of content blocking solution will be available for LayTheme. Otherwise I simply cannot use LayTheme anymore for any website that plans on embed these kinds of videos...

            Thanks for any help with this.

            My best,
            Tobias

            1 Reply Last reply
            0
            • M Offline
              M Offline
              michaelmaeder
              wrote on last edited by
              #6

              I figured out the shortcode situation:

              If I use a shortcode instead of the video element and use the following shortcode:

              [borlabs-cookie id="youtube" type="content-blocker"]https://www.youtube.com/watch?v=LWNjX2d8wIg[/borlabs-cookie]<h4 class="_Caption">Video: B-Movie: Lust & Sound in West-Berlin 1979–1989</h4>
              

              The I can activate in the Borlabs content-blocker settings Save thumbnails locally, Change URL to youtube-nocookie.com as well as Video Wrapper (in order for the video size to be responsive).

              Then I have also added the following css:

              div._brlbs-embed._brlbs-video-youtube {
              	min-height: 350px;
              width: 100%;
              }
              

              Which ensures that the content blocker, when shown, reserves som space (otherwise it was invisble for some reason, as the row didnt reserve the space accordingly).

              With all this in place the content-blocker as well as the video show up properly and with responsive styling (and if you include the h4 tag also with caption).

              Of course it would be great if the video tag would be automatically detected instead, so we wouldn't have to code. According to Borlabs support this can only be programmed by LayTheme and not by Borlabs.

              Problem remaining:
              The link issue which will prevent from any Borlabs links to function, which seems to be a LayTheme issue and which is unfortunately not solved by earlier LayTheme versions, as suggested by @Richard.
              This means that if one chooses to not allow external media, the vides will be replaced with the content blocker screen (if you use the solution above), but the user will not have a way to deactivate the content-blocker, becaus the unblock link on the content blocker will not work and will lead to a JS error. When choosing to accept all in the initial cookie banner, the content is unblocked however.

              My Best

              1 Reply Last reply
              0
              • RichardR Offline
                RichardR Offline
                Richard
                Global Moderator
                wrote on last edited by
                #7

                Dear @michaelmaeder

                I have forwarded this to Armin for a closer inspection āœ…šŸ”
                thank you for the great updated information!


                Sincerely
                Richard
                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  michaelmaeder
                  wrote on last edited by
                  #8

                  @Richard Thanks. Are there any updates? @Armin-Unruh any chance you can take a look at this?

                  1 Reply Last reply
                  0
                  • RichardR Offline
                    RichardR Offline
                    Richard
                    Global Moderator
                    wrote on last edited by Richard
                    #9

                    Not yet sorry @michaelmaeder , because Borlabs is a third-party plugin it may take some time. Any previous versions of LayTheme files can be provided if things were working in the past and you wish to return to that phase.
                    Email lostfiles@laytheme.com with your license key and link to this thread for context if possible šŸŒ


                    Best wishes šŸŒ…
                    Richard
                    1 Reply Last reply
                    0
                    • arminunruhA Offline
                      arminunruhA Offline
                      arminunruh
                      Global Moderator
                      wrote on last edited by
                      #10

                      hey @michaelmaeder I sent u an email

                      1 Reply Last reply
                      1
                      • M Offline
                        M Offline
                        michaelmaeder
                        wrote on last edited by
                        #11

                        FYI whoever is interested. The JS error was now fixed and there is some effort spent to making it possible to detect videos automatically with Borlabs cookies, but thats still up in the air. WIth the short code approach detailed ubove it works like a charm no though, so there is a solution.

                        1 Reply Last reply
                        0
                        • RichardR Offline
                          RichardR Offline
                          Richard
                          Global Moderator
                          wrote on last edited by
                          #12

                          Dear @michaelmaeder

                          Thank you so much for this update - Always super helpful for users on the future searching the Forum šŸ”šŸ’„


                          Have a wonderful day Michael šŸŒ
                          Richard
                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          I also code custom websites or custom Lay features.
                          šŸ’æ Email me here: šŸ’æ
                          info@laytheme.com

                          Before you post:
                          1. When using a WordPress Cache plugin, disable it or clear your cache.
                          2. Update Lay Theme and all Lay Theme Addons
                          3. Disable all Plugins
                          4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

                          This often solves issues you might run into

                          When you post:
                          1. Post a link to where the problem is
                          2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
                          3. If the problem is difficult to explain, post screenshots / link to a video to explain it
                          Online Users
                          Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
                          laytheme.com
                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Search