PDA

View Full Version : BB Code Enhancements - [BB Code] YouTube Javascript Embed


wii
18 Feb 2009, 12:48
Show YouTube videos directly in your vBulletin forum posts.
Very easy to install and please Mark as Installed if you decide to use it, thanks.

Changes to my old YouTube embed:

1. All videos are now larger (640x480 pixels)
2. All videos are now shown in high quality and stereo sound (if available)
3. You can now embed videos in HD (if available)
4. Valid XHTML code (works in all modern browsers and operating systems).

Installation is as follows:

1. Go To AdminCP.
2. Select Custom BB Codes.
3. Add New BB Code.
4. Fill in the following:

Title: YouTube BB Code
Tag: yt
Replacement:


<script src="http://www.yourforum.com/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript" >
AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0','width','640','height','480','src','http://www.youtube.com/v/{param}&ap=%2526fmt%3D18','quality','high','wmode','transparent','name','youtube','allow scriptaccess','sameDomain','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','http://www.youtube.com/v/{param}&ap=%2526fmt%3D18' );</script>



5. Upload the included javascript file to your forum root:
Change the example URL: www.yourforum.com to your own URL.

6. Edit the code above to the exact location of the javascript file you just uploaded.

Example: 1EutKrKTfLk
Description: YouTube
Use {Option}: No

When installed, use the code in your forum like this:


1EutKrKTfLk


For HD use this:


1EutKrKTfLk&amp;ap=%2526fmt%3D22

wii
18 Feb 2009, 12:53
I will upload the files now.

Stifmeister2
18 Feb 2009, 20:20
Demo anywhere?

ABDALWAHID
18 Feb 2009, 21:09
Thanks...

GotWalked
18 Feb 2009, 22:36
terrible. couldn't get it to work

wii
19 Feb 2009, 07:16
I uploaded some screenshots, the MOD works just fine, just make sure the path to the javascript file is correct.

For my own forum I use the MOD with a different movie size of 640x384 pixels (widescreen format) this way I have no borders when viewing HD widescreen movies, which we use a lot.

Also note, that this MOD forces YouTube videos into high quality at all times, which means that many tracks that are mono when viewing in YouTube are in stereo when viewing at the forum, this was kinda a surprise for me too, but it's a quite obvious difference, of course only applies when the source material is in stereo...!

newmasalaboard
19 Feb 2009, 10:12
Looks Intresting !!

Let me test it ...

ByG SteAm
22 Feb 2009, 21:12
Where do we find the text on a youtube video for HD. I can see where you get the regular code from.

wii
23 Feb 2009, 10:20
What text ? Not sure what you mean.......

movslow
23 Feb 2009, 19:28
Great mod, however are their any current hacks that conflict w/this mod?

I'm just getting a blank screen where the video should be.
:confused:

wii
24 Feb 2009, 08:53
Did you check the filepath of the included file ?
Can I see an example of it where you see the blank page ?

black_bullitt
04 Mar 2009, 01:52
Installed, working great, thanks!

wii
05 Mar 2009, 15:12
Glad you like it...

dpetersman
05 Mar 2009, 17:49
I'm kinda an idiot & it took me a few try's to get it to work. After I realized all I needed to input as the value was the specific video #, Worked like a charm :o

To save anyone else the embarrassment, here's what I mean...

typical YouTube video URL's look like this:

http://www.youtube.com/watch?v=1EutKrKTfLk

All you need is the text after the "v=" in the case of the link above, "1EutKrKTfLk" is what you would put between the [ /yt] BB code (without the "Quotes") Like this:
[yt]1EutKrKTfLk



Anyway, Works Great. I love it. Thanks!

Slacker
06 Mar 2009, 21:37
I would love something like there where the user could enable/disable the tag (like we can all do with IMG tags) in their User CP so people browsing at work aren't setting off alarms on the company's monitoring software. Any chance of that happening? Thanks!

guncanada
15 Mar 2009, 14:31
works great. But how can i install a button that can put the tags around for the users. Like a little youtube button so it will pop up a window where they can copy the youtube url

vijayninel
18 Mar 2009, 04:36
This is awesome but...Right now the system system we have on our forums is that the user just copies and pastes the url link of the video and the video shows up on the page when posted......no inserting between the bb codes and manually putting the end part.

Can something like that be done with this.

Thanks. :)

A Random Otaku
12 Jun 2009, 11:31
Great mod, however are their any current hacks that conflict w/this mod?

I'm just getting a blank screen where the video should be.
:confused:


This was blank because of a mistake in the code.

Here is the original:

<script src="http://www.yourforum.com/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript" >
AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0','width','640','height','480','src','http://www.youtube.com/v/{param}&ap=%2526fmt%3D18','quality','high','wmode','transparent','name','youtube','allow scriptaccess','sameDomain','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','http://www.youtube.com/v/{param}&ap=%2526fmt%3D18' );</script>

Here is the fix:

<script src="http://www.yourforum.com/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript" >
AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0','width','640','height','480','src','http://www.youtube.com/v={param}&ap=%2526fmt%3D18','quality','high','wmode','transparent','name','youtube','allow scriptaccess','sameDomain','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','http://www.youtube.com/v/{param}&ap=%2526fmt%3D18' );</script>

I erased the forward slash after the youtube.com/v and added a = in the front. Works perfect now. I've turned the fixed part red so you can find it easier.

So if anybody has a blanking problem, try that.

Good BB Code. Installed :D

Nosfer@tu
14 Jun 2009, 10:10
This is awesome but...Right now the system system we have on our forums is that the user just copies and pastes the url link of the video and the video shows up on the page when posted......no inserting between the bb codes and manually putting the end part.

Can something like that be done with this.

Thanks. :)

How do you do that ?
it REALLY sux when the code cant even crap the excessive url into what it needs.
Very long educational process for the users.

wafa
10 Sep 2009, 03:36
thank you ..

it's work with me .

g4dual
15 Feb 2011, 11:01
Thanks !! :D

el-q6ri
10 May 2011, 09:28
is this code display the related video if yes how to stop it from loading the related video at the end ?