vBulletin Mods

The Official vBulletin Modifications Site

YouTube BB Code (W3C-compliant!)
by Fangs404
22 Oct 2008 06:31

1 Attachment(s)
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
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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: https://www.vbulletin.org/forum/external/2009/01/66.jpg

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.

lucky51 22 Oct 2008 11:52

yes working thanks

SPARKS MAN 22 Oct 2008 17:00

thanks a lot i try it

Janfri 23 Oct 2008 19:07

Thanks a lot. Perfectly valid XHTML transitional. I have tried many bb codes for youtube, but this is the only one I have found that works with XHTML! Thank you very much!!!

gundrik 24 Oct 2008 17:47

bro, works perfrectly! finally someone who can easily explain how to do this! A+++++++

Barakat 25 Oct 2008 10:07

yap the same as iam useing in my codes ,,,,


thanks ,

Gleedo 26 Oct 2008 11:21

Good stuff, works a treat :)


Fangs404 26 Oct 2008 18:20


Originally Posted by the stig (Post 1653210)
Is this the same mod where I can just post a youtube embeded link and it turns into a video screen?

It sure is (except you don't post the full URL - just the video ID).

EWGF 26 Oct 2008 19:49

Very nice :D

Two times smaller than my previous code and your BORKED note is good to know too.

ShawneyJ 28 Oct 2008 09:30

cool ta ;)

Fangs404 29 Oct 2008 06:55


Originally Posted by the stig (Post 1654264)
Is there a mod where you can just enter the youtube link from the browser address bar (i.e. http://www.youtube.com/watch?v=sm1IfqVofNA) and it turns into a video screen in the post?

http://www.vbulletin.org/forum/showthread.php?t=193151 supposedly does it, but several of the comments don't look too good. Plus, his code isn't W3C compliant.

Masiello 31 Oct 2008 14:49

Thanks a lot men :)

TheLastSuperman 02 Nov 2008 01:04

Thanks :D

Fangs404 13 Dec 2008 06:48

I just updated this to include a new tag (youtubehd) which enables embedding YouTube's new HD mode.

Fangs404 13 Dec 2008 22:00

And I just updated it once more to add support for HQ mode (which is better than regular but worse than HD).

All times are GMT. The time now is 17:43.

Powered by vBulletin® Version 3.8.12
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.