vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   BB Code Enhancements - YouTube BB Code (W3C-compliant!) (https://vborg.vbsupport.ru/showthread.php?t=201698)

Fangs404 01-13-2009 10:00 PM

YouTube BB Code (W3C-compliant!)
 
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
Replacement:
HTML Code:

<object type="application/x-shockwave-flash" data="http://www.youtube.com/v/{param}&fs=1&hd=1" width="644" height="390"><param name="movie" value="http://www.youtube.com/v/{param}&fs=1&hd=1" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><a href="http://www.youtube.com/watch?v={param}">http://www.youtube.com/watch?v={param}</a></object>
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://vborg.vbsupport.ru/attachmen...1&d=1250542951

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.

cooltechie 01-18-2009 06:09 PM

Members simply paste what they see in the browser URL. How can I change it to accept full URL instead of just ID?

Fangs404 01-20-2009 02:14 AM

Quote:

Originally Posted by cooltechie (Post 1717108)
Members simply paste what they see in the browser URL. How can I change it to accept full URL instead of just ID?

You'll need another (fancier) mod if you want to do this. Given vB3's current BBCode system, a simple BBCode can't achieve that unfortunately. Just tell your members how to properly use this BBCode.

JackRock 01-21-2009 04:08 AM

My members just had to be edumacated. But they soon learned how it works.

Aliraqis 01-21-2009 06:47 AM

thnx man

jesus likes pie 01-25-2009 02:52 PM

Thank you!

RedHacker 01-31-2009 03:45 AM

Why i saw white page if url put....?

Fangs404 01-31-2009 04:41 PM

I don't understand. Copy/paste the [youtube] command you were trying.

tony adams 01-31-2009 06:47 PM

installed - many thanks - any way of getting the icon to show in quick reply - typing the text works so it is ok from there.

RedHacker 01-31-2009 09:51 PM

Quote:

Originally Posted by Fangs404 (Post 1730091)
I don't understand. Copy/paste the [youtube] command you were trying.

If i put [YOYTUBE]http://www.youtube.com=xxxxxxxxxxxxxxxxxxx[/YOUTUBE] saws white screen...

And its saws lucky its sould be when i put [YOYTUBE]xxxxxxxxxxxxxxxxxxx[/YOUTUBE]

dmknights 02-02-2009 10:40 PM

*Installed*
thank you

Fangs404 02-04-2009 12:55 AM

I actually just checked YouTube's dimensions for regular and HQ, and it's 644x390 (HD is 858x508 for comparison). I went ahead and changed it. :)

RedHacker 02-04-2009 12:58 AM

Cant work with full url from Youtube....?

Fangs404 02-04-2009 04:18 AM

Quote:

Originally Posted by RedHacker (Post 1733667)
Cant work with full url from Youtube....?

Nope, as I said earlier, it's not possible with a simple BBCode mod. At least not until the vB3 team builds in a way to use PHP or something fancier than what we have available.

james-76 02-04-2009 08:27 PM

This is great TY :)

Will this affect my bandwidth much?

Fangs404 02-05-2009 06:23 AM

Quote:

Originally Posted by james-76 (Post 1734606)
This is great TY :)

Will this affect my bandwidth much?

Not at all. It loads directly from YouTube. There's absolutely no strain on your server because of this BBCode.

Martin9887 02-05-2009 07:37 AM

Just put these in. I hope it's ok to ask this question here, on the editor bar is there anyway to arrange the order of the buttons?:

https://vborg.vbsupport.ru/

I want it: Normal, HQ, HD.

Fangs404 02-05-2009 09:33 PM

Quote:

Originally Posted by Martin9887 (Post 1734947)
Just put these in. I hope it's ok to ask this question here, on the editor bar is there anyway to arrange the order of the buttons?:

http://i312.photobucket.com/albums/l...d/youtubes.png

I want it: Normal, HQ, HD.

The order is determined based on the order in which you add the BBCodes to the BBCode manager. So, remove HD and then readd it and it should appear after HQ.

Fangs404 02-06-2009 09:59 PM

I don't know if you guys knew this, but if you want to make the video autoplay, you can do something like this:

Code:

[youtubehd]zlfKdbWwruY&autoplay=1[/youtubehd]
Just add &autoplay=1 to the end of the video ID.

lgnd 02-08-2009 11:36 AM

Installed! Thank You!

Alien 02-08-2009 10:48 PM

Just installed all three, thanks so much for the code that can validate!

P.Cahill 02-08-2009 10:54 PM

gonna tag this for future reference =) i dont need this on my board just yet but it'll be handy to add in if people feel the need to post youtube links

RedHacker 02-09-2009 02:00 AM

Youtube HQ and HD where found....?

Fangs404 02-09-2009 04:51 AM

Quote:

Originally Posted by RedHacker (Post 1738270)
Youtube HQ and HD where found....?

I don't understand your question.

jesus likes pie 02-10-2009 02:07 AM

Okay this is confusing to me:

Mod is working fine for me and most members but a few of them have the same videos that show up fine for me, show up as "BORKED" for them. Any ideas??

They have flash installed...normal youtube works fine and the tag is set up properly since I can see the videos that they cannot.

It's really quite bizarre.

They also cleared cache/refreshed (CTRL + F5)

Fangs404 02-10-2009 03:31 AM

Quote:

Originally Posted by jesus likes pie (Post 1739310)
Okay this is confusing to me:

Mod is working fine for me and most members but a few of them have the same videos that show up fine for me, show up as "BORKED" for them. Any ideas??

They have flash installed...normal youtube works fine and the tag is set up properly since I can see the videos that they cannot.

It's really quite bizarre.

They also cleared cache/refreshed (CTRL + F5)

Well, it's definitely something on their end then. What browser are they using? If they're using FF, find out what extensions they have installed. Adblock, NoScript, and Greasemonkey are the most likely culprits for problems.

Nightmare-GameZ 02-16-2009 04:08 AM

Woot found a good one at last. =P Installed!

RedHacker 02-19-2009 12:09 PM

The videos HD from my forum are: We're sorry this video in no longer available...

Why....?

Vaupell 02-19-2009 07:30 PM

All good, Hd's something fail, but then again HD is only in testing phase

ewen though it appears availible youtube stated serveral times that its only in
testing for now.

so 100% compability should not be exspected at the moment.

Lovely though

RedHacker 02-19-2009 08:41 PM

Some message from Youtube HD

Tagert 02-19-2009 11:26 PM

thanks!

Suiram 02-20-2009 02:35 AM

thanks for the code.....

1.) i can not see the youtube picture button. it doesn't even show in the admincp under the button image heading. i placed the picture on my site and it's there. i can type in a browser's url and it shows up.

any idea ?
i don't use any forum mods.

2.) also seems most HD clips don't have a hq version. i have several hd youtube clips. you can view them in regular quality OR in hd, but not hq. but i would like to have one clip that i can use as an example for all three qualaties. so i want to embed the same clip thrice for each quality and show that as my tutorial. not sure if it's possible ?? anyone has a clip that can be viewed in regular, hq and hd ???

the way i figured it out is this:
if you upload a clip below hd quality it will have 2 versions: regular and hq
if you upload a hd clip it will have two versions: regular and hd (but not hq)
(unless i'm wrong)

thanks,

RedHacker 02-20-2009 04:28 AM

What happen with Youtube HD..!!!If go Youtube Homepage saw normal but from forum not saw....

james-76 02-20-2009 01:48 PM

from the videos working perfectly on firefox and IE all of a sudden today they are showing as white boxes and not loading in both.

http://www.birdiechance.co.uk/forums...hread.php?t=88

Is it just me or is it happening for everybody else?

RedHacker 02-20-2009 04:17 PM

Same problem... :mad:

RedHacker 02-21-2009 08:00 AM

http://www.instict.net/showpost.php?p=270&postcount=1

Look this.... :(

james-76 02-21-2009 11:05 AM

The videos now work again using Firefox but still white boxes with Internet Explorer :s

Suiram 02-21-2009 11:23 AM

Quote:

Originally Posted by Suiram (Post 1749534)
thanks for the code.....

1.) i can not see the youtube picture button. it doesn't even show in the admincp under the button image heading. i placed the picture on my site and it's there. i can type in a browser's url and it shows up.

any idea ?
i don't use any forum mods.

2.) also seems most HD clips don't have a hq version. i have several hd youtube clips. you can view them in regular quality OR in hd, but not hq. but i would like to have one clip that i can use as an example for all three qualaties. so i want to embed the same clip thrice for each quality and show that as my tutorial. not sure if it's possible ?? anyone has a clip that can be viewed in regular, hq and hd ???

the way i figured it out is this:
if you upload a clip below hd quality it will have 2 versions: regular and hq
if you upload a hd clip it will have two versions: regular and hd (but not hq)
(unless i'm wrong)

thanks,

say what ?

james-76 02-21-2009 08:04 PM

not working in firefox again now :(

Fangs404 02-23-2009 12:05 AM

Quote:

Originally Posted by Suiram (Post 1749534)
thanks for the code.....

1.) i can not see the youtube picture button. it doesn't even show in the admincp under the button image heading. i placed the picture on my site and it's there. i can type in a browser's url and it shows up.

any idea ?
i don't use any forum mods.

2.) also seems most HD clips don't have a hq version. i have several hd youtube clips. you can view them in regular quality OR in hd, but not hq. but i would like to have one clip that i can use as an example for all three qualaties. so i want to embed the same clip thrice for each quality and show that as my tutorial. not sure if it's possible ?? anyone has a clip that can be viewed in regular, hq and hd ???

the way i figured it out is this:
if you upload a clip below hd quality it will have 2 versions: regular and hq
if you upload a hd clip it will have two versions: regular and hd (but not hq)
(unless i'm wrong)

thanks,

For your first question, I have no idea. Sounds like you copied/pasted something wrong. Double-check everything.

For your second question, look at the examples I gave. I use the same video 3 times. It has all 3 qualities.

For those of you that're experiencing issues with this not loading, there's nothing wrong with my script or your browsers or servers. It's just YouTube having issues. Give it time, and they'll straighten things out again.


All times are GMT. The time now is 05:28 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01489 seconds
  • Memory Usage 1,822KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete