1. Hello Guest. You have limited privileges and you can't "SEARCH" the forums. Please "Log In" or "Sign Up" for additional functionality. Click HERE to proceed.

HOW TO: Add YouTube videos to your posts

Discussion in 'Suggestion Box' started by Gamuru, Jan 12, 2008.

  1. Gamuru

    Gamuru Guest

    Messages:
    1,275
    Likes Received:
    19
    Trophy Points:
    38
    Location:
    Granite Falls, WA
    I know we've all wondered how to embed YouTube videos in our posts. But we've had to be happy with just putting hyperlinks inline and living with it.

    Well... not an more! I've found a way to embed (yeah, that's right! I said embed) YouTube videos right into our posts (and our replies, for that matter).

    Assuming you've found a video you want to embed from YouTube, take a look at the code for embedding it. In this exmple, we'll use some video I shot of a raging waterfall by my house during the last floods. Here's a screen shot showing where you will find the code for embedding video.

    [​IMG]

    Here's a step-by-step on how to do it:
    1. Once you've located the box where the information is found, look specifically at the textbox labeled, "Embed."

    [​IMG]

    This is the code we'll need for our embedded file. Copy the code to a blank notepad file or wherever is convenient for you to read the code.

    2. Here's the code in its raw form:
    Code:
    <object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/FTAPiU-ruaM&rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/FTAPiU-ruaM&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>
    The parts we're interested in are the width, the height, and the location of the YouTube video file. If you'll read the code from the beginning, we'll parse out those bits of information:
    (I'm not sure what the "&rel=1" thing does, but we don't need it. So, who cares?)

    3. So our width=425, our height=355, and our file location=http://www.youtube.com/v/FTAPiU-ruaM. Now, here's the key to making this work. If you just plug these variables in like they are, it won't work. The YouTube.com server knows what to do with, "http://www.youtube.com/v/FTAPiU-ruaM," but the XJBikes.com server doesn't. We have to add the correct file extension onto the file name for it to work. What's that extension, you ask? It's ".swf".

    So, now our file location should read, "http://www.youtube.com/v/FTAPiU-ruaM.swf" With that minor correction, we're good to go.

    4. Click on the Insert Flash File button...

    [​IMG]

    ...and plug in your location, width, and height variables (in that order). If you've done everything correctly, it should display the YouTube video like this:

    [flash=425,355]http://www.youtube.com/v/http://www.youtube.com/v/FTAPiU-ruaM.swf[/flash]

    The actual code for this video reads:
    Code:
    [flash=425,355]http://www.youtube.com/v/FTAPiU-ruaM.swf[/flash]
    Well, that about wraps this How-To up. I hope you found this one helpful. Have a comment or suggestion? You know what to do...
     
  2. SnoSheriff

    SnoSheriff Site Owner Staff Member Administrator

    Messages:
    20,739
    Likes Received:
    104
    Trophy Points:
    63
    Location:
    MB, CAN
    BRILLIANT, THANK YOU! I just started looking into video capabilities and here is your How To. Let me know if you have other video sites ‘decoded’ for video inserts.
     
  3. Gamuru

    Gamuru Guest

    Messages:
    1,275
    Likes Received:
    19
    Trophy Points:
    38
    Location:
    Granite Falls, WA
    If there are specific video hosting sites you want looked at link to them in your replies, and I'll see what I can do with them. Chances are they will be of similar coding convention.
     
  4. turbobike

    turbobike Member

    Messages:
    225
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Grand Island, Nebraska
    this is great, some other forums I use will allow the <object> html code

    others use a differen't forum of 'flash insert'.

    i do have to say, i learned this forums manner by viewing one of your other posts!
     

Share This Page