MyBB Community Forums

Full Version: Custom Variables In a Blogger Post
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
First of All, I know this question is not related to MyBB but I couldn’t find another way to ask.

I am trying to make a Custom Variable in Blogger to embed a youtube video, just by entering URL link of a video. But it doesn’t appear, please help


Code I am pasting in a Blogger Post (HTML Mode)

<div class="ytiframe">http://www.youtube.com/embed/W7qWa52k-nE</div>


I have added the code in Blogger CSS Template

.ytiframe {
   <iframe src="$"
   width="560" height="315" frameborder="0" allowfullscreen="0"></iframe>
}


The post is returning only the url of youtube video instead of an iframe.

I want to make like MyCode for Blogger post.
Hi,

an iFrame tag inside a CSS? No way.

You have to add the html code of the iframe as always, and with Javascript you could change the style of the iframe

More info:

https://stackoverflow.com/questions/2177...-to-iframe

.
what about just adding a class to the iframe?



<iframe class="ytiframe" src="http://www.youtube.com/embed/W7qWa52k-nE" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>


iframe.ytiframe {
width: 560px;
height: 315px;
}

Edit** Sorry, I misread this. you want the video to show with just the url... I will look around for a solution.