MobileHacks
New Member
YouTube BBCode tag here, but every single one of them uses the embed tag, which is an illegal XHTML tag. I set out to find a way to create a W3C-compliant YouTube BBCode tag, and this is what you see here. Note that the text "BORKED" is displayed when the YouTube video can't be displayed (it's the equivalent of the HTML img tag's alt attribute). Obviously feel free to change this to whatever alternate text you want.
Title: YouTube
BB Code Tag Name: youtube
Replacement:
Example: [youtube]dMH0bHeiRNg[/youtube]
Description: Embed a YouTube video. You <b>only</b> put the video ID in between the BBCode tags (<b>NOT</b> the full URL!). Embedding <b>must</b> be enabled for the video!
Use Option: No
Image:
Title: YouTube
BB Code Tag Name: youtube
Replacement:
PHP:
<object type="application/x-shockwave-flash" data="http://www.youtube.com/v/{param}" width="425" height="344"><param name="movie" value="http://www.youtube.com/v/{param}" />BORKED</object>
Description: Embed a YouTube video. You <b>only</b> put the video ID in between the BBCode tags (<b>NOT</b> the full URL!). Embedding <b>must</b> be enabled for the video!
Use Option: No
Image: