I’ve seen a lot of mods dedicated to adding YouTube Videos. I’ve seen issues people have had with trying to get the mods to work with various versions of SMF.
In practice though, embedding a YouTube video on SMF is very simple. Here’s some very easy steps to do so (NO mods required):
- Do NOT use the WYSIWYG editor when making a post with a video embedded (it will mess up the posting)
- Use the FLASH tag (needs to be enabled in your settings – we limit it to Admins and Moderators only)
- Select the YouTube video you wish to embed, and hit the “Embed” link
- Copy the code to your clipboard – you’re only interested in some of it. We’ll get to that in the next few steps.
- Create a flash tag: [flash=200,200][/flash] <—- The default
- Look at the YouTube embed code and look for the URL portion:
Full embed code:
<object width=”640″ height=”385″><param name=”movie” value=”http://www.youtube.com/v/ZQ5p9WttVhE?fs=1&hl=en_US&rel=0″></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/ZQ5p9WttVhE?fs=1&hl=en_US&rel=0″ type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”640″ height=”385″></embed></object>
- Look at the YouTube embed code and look for the URL portion:
- The portion you want:
http://www.youtube.com/v/ZQ5p9WttVhE?fs=1&hl=en_US&rel=0
Insert that between your [flash] tags
- Note the width and height values… in this case, 640×385. Change your default SMF tags to use them (replace the default 200,200 to the proper size. In this case, to 640,385)
That’s it! Save the page! If it doesn’t work, then (a) embedding is not permitted for that video (I’ve run into a few that will create the embed code, but wont allow embedding), or (b) you missed something in the copy/paste, or (c) you forgot to use the text (NON-WYSIWYG) editor.
We use this method pretty extensively on the Star Trek Phase 2 Forums, such as here:
http://forums.startreknewvoyages.com/index.php?topic=11693.0
