PDA

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


wii
02-17-2009, 10:00 PM
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','transp arent','name','youtube','allowscriptaccess','sameD omain','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
02-18-2009, 11:53 AM
I will upload the files now.

Stifmeister2
02-18-2009, 07:20 PM
Demo anywhere?

ABDALWAHID
02-18-2009, 08:09 PM
Thanks...

GotWalked
02-18-2009, 09:36 PM
terrible. couldn't get it to work

wii
02-19-2009, 06:16 AM
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
02-19-2009, 09:12 AM
Looks Intresting !!

Let me test it ...

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

wii
02-23-2009, 09:20 AM
What text ? Not sure what you mean.......

movslow
02-23-2009, 06:28 PM
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
02-24-2009, 07:53 AM
Did you check the filepath of the included file ?
Can I see an example of it where you see the blank page ?

black_bullitt
03-04-2009, 12:52 AM
Installed, working great, thanks!

wii
03-05-2009, 02:12 PM
Glad you like it...

dpetersman
03-05-2009, 04:49 PM
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
03-06-2009, 08:37 PM
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
03-15-2009, 01:31 PM
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
03-18-2009, 03:36 AM
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
06-12-2009, 10:31 AM
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','transp arent','name','youtube','allowscriptaccess','sameD omain','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','transp arent','name','youtube','allowscriptaccess','sameD omain','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
06-14-2009, 09:10 AM
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
09-10-2009, 02:36 AM
thank you ..

it's work with me .

g4dual
02-15-2011, 10:01 AM
Thanks !! :D

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