Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Template Modifications

Reply
 
Thread Tools
YouTube BB Code (W3C-compliant!) Details »»
YouTube BB Code (W3C-compliant!)
Version: 1.3.5, by Fangs404 Fangs404 is offline
Developer Last Online: Sep 2019 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 3.7.x Rating:
Released: 10-21-2008 Last Update: Never Installs: 80
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:
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:

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.

Comments
  #52  
Old 02-04-2009, 04:17 AM
Fangs404 Fangs404 is offline
 
Join Date: Oct 2008
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by the stig View Post
What should I do now?

I have regular and HQ youtube bb code. Should I just change the BB codes in bb code manager? Will changing the bb code to a different dimension affect any of our previously embeded videos in various post/threads?

thanks.
Yes, it'll change all instances of youtube or youtubehq to be the new dimensions, including the previously embedded ones.
Reply With Quote
  #53  
Old 02-04-2009, 11:43 PM
the stig's Avatar
the stig the stig is offline
 
Join Date: Sep 2008
Posts: 163
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Fangs404 View Post
Yes, it'll change all instances of youtube or youtubehq to be the new dimensions, including the previously embedded ones.
Much thanks, sir. This is the best youtube embedding hack till date.
Reply With Quote
  #54  
Old 02-05-2009, 06:23 AM
Fangs404 Fangs404 is offline
 
Join Date: Oct 2008
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by the stig View Post
Much thanks, sir. This is the best youtube embedding hack till date.
Thank you. That means a lot.
Reply With Quote
  #55  
Old 02-06-2009, 04:55 PM
james-76's Avatar
james-76 james-76 is offline
 
Join Date: Feb 2009
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When i try to post these videos in the first post as a thread they come up as BORKED on firefox. When they are a reply to a thread so the 2nd post or after they work perfectly.

Can you help?

http://www.birdiechance.co.uk/forums...osted=1#post84

forgive the forum its not quite ready for the official opening just yet.


EDIT:
Ok I realised the problem and it was the tags and link were not on the same line. Iwill post below incase others have the same issue

Code:
This works fine

[YOUTUBE]1YQhoMt68CU[/YOUTUBE]

This comes up as BORKED and does not work

[YOUTUBE]1YQhoMt68CU
[/YOUTUBE]
Reply With Quote
  #56  
Old 02-06-2009, 09:58 PM
Fangs404 Fangs404 is offline
 
Join Date: Oct 2008
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by james-76 View Post
When i try to post these videos in the first post as a thread they come up as BORKED on firefox. When they are a reply to a thread so the 2nd post or after they work perfectly.

Can you help?

http://www.birdiechance.co.uk/forums...osted=1#post84

forgive the forum its not quite ready for the official opening just yet.


EDIT:
Ok I realised the problem and it was the tags and link were not on the same line. Iwill post below incase others have the same issue

Code:
This works fine

[YOUTUBE]1YQhoMt68CU[/YOUTUBE]

This comes up as BORKED and does not work

[YOUTUBE]1YQhoMt68CU
[/YOUTUBE]
Yeah, what that'll do is try to make the URL include a return which I guess causes YouTube to throw a fit.

Also, 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.
Reply With Quote
  #57  
Old 03-20-2009, 02:07 AM
the stig's Avatar
the stig the stig is offline
 
Join Date: Sep 2008
Posts: 163
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mr. Fangs404, looks like YouTube changed their default video size again (for regular and HQ videos). Would you be kind enough to update the sizes again? thanks.
Reply With Quote
  #58  
Old 03-22-2009, 03:36 AM
Fangs404 Fangs404 is offline
 
Join Date: Oct 2008
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by the stig View Post
Mr. Fangs404, looks like YouTube changed their default video size again (for regular and HQ videos). Would you be kind enough to update the sizes again? thanks.
Hm, according to my calculations, regular/HQ is 644x390 and HD is 858x508 which is what the BBCode uses currently. Are you seeing something different on your end?
Reply With Quote
  #59  
Old 03-25-2009, 09:13 PM
Tannerman's Avatar
Tannerman Tannerman is offline
 
Join Date: Mar 2002
Location: Chicago, IL
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anyone noticed in the last week or so while using this modification that HQ videos are no longer defaulting in HQ mode when embedded? The HQ button is there, but it's no longer the default when the video starts. Did something change on the parameter level?
Reply With Quote
  #60  
Old 03-29-2009, 01:32 AM
Fangs404 Fangs404 is offline
 
Join Date: Oct 2008
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #61  
Old 03-30-2009, 03:05 AM
richardyoung richardyoung is offline
 
Join Date: Mar 2004
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

NIce.. just installed and works great
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:56 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10655 seconds
  • Memory Usage 2,313KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)bbcode_html
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete