Version: 1.3.5, by Fangs404
Developer Last Online: Sep 2019
Category: BB Code Enhancements -
Version: 3.8.x
Rating:
Released: 01-13-2009
Last Update: Never
Installs: 217
Re-useable Code Translations
No support by the author.
I searched for a decent YouTube BB code 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 BB code tag, and this is what you see here.
Title: YouTube BB Code Tag Name: youtube Replacement:
Example: [youtube]zlfKdbWwruY[/youtube] Description: Embed a YouTube video. You <b>only</b> put the video ID in between the BB code tags (<b>NOT</b> the full URL!). Embedding <b>must</b> be enabled for the video! Use Option: No Image:
Important Note!
A link to the YouTube video is displayed if the YouTube video fails to load. There are a variety of reasons this might occur:
- You didn't properly enter the video ID between the BB code tags.
- You don't have the latest version of Flash.
- You are using Firefox and have a conflicting extension (AdBlock, NoScript, a Greasemonkey script, etc).
- The video doesn't allow embedding.
- You have some other problem on your end (corrupt browser install, spyware, virus, etc.).
- YouTube is currently having a problem.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
I just removed the HQ YouTube tag (youtubehq). It's no longer necessary since the embedded player now has a HQ button built in. The embedded player actually also has an HD button if HD is enabled for the video, but I'm leaving the HD tag (youtubehd) because it's a physically larger player.
Per james-76's suggestion, I changed the BORKED text to something with a little more meaning that will hopefully help solve any problems with this plugin in the future. Here's the new text:
HTML Code:
Something went wrong. Please make sure you added the video correctly. Click <a href="misc.php?do=bbcode">here</a> to see how YouTube videos should be embedded. There could also be a technical issue that's not your fault. Click <a href="http://www.youtube.com/watch?v={param}">here</a> to view the video on YouTube's site. If this link doesn't work, you did something wrong.
Yes, it does, but I include both options because the HD videos are physically larger than the standard/HQ videos. It's completely up to you if you want to use both. Another option is just to increase the size of the standard player to the HD size.
The youtube HD code works fine when I preview it in the replacement window in the admin control panel, however in posts, it doesn't display, I just see the "[youtubehd]zlfKdbWwruY[/youtubehd]". The Youtube Regular & HD code works fine however. My apologies if this was already covered. Thank you.