Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

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.8.x Rating:
Released: 01-13-2009 Last Update: Never Installs: 217
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.
Благодарность от:
Perrier Sophie

Comments
  #112  
Old 10-10-2009, 12:13 PM
phonexpo phonexpo is offline
 
Join Date: Sep 2005
Location: Dublin
Posts: 231
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed, working perfectly.

Thanks

-Patrick
Reply With Quote
  #113  
Old 02-18-2010, 02:33 AM
manofphat's Avatar
manofphat manofphat is offline
 
Join Date: Jan 2007
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm looking for a way to convert the YouTube posts generated by this mod on my 3.8.0 forum to the new vBulletin 4.0 media embedding system. Any suggestions?
Reply With Quote
  #114  
Old 02-23-2010, 02:00 AM
Fangs404 Fangs404 is offline
 
Join Date: Oct 2008
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by manofphat View Post
I'm looking for a way to convert the YouTube posts generated by this mod on my 3.8.0 forum to the new vBulletin 4.0 media embedding system. Any suggestions?
I don't have vB4, so I'm afraid I can't help you right now.
Reply With Quote
  #115  
Old 02-23-2010, 06:01 AM
salvador21 salvador21 is offline
 
Join Date: Mar 2009
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think you would do a search (in the database?) for [YOUTUBE] tags, replace with [VIDEO] and aff the youtube full URL.

Not something I would like to try.
Reply With Quote
  #116  
Old 02-25-2010, 11:35 PM
cayne cayne is offline
 
Join Date: Jun 2007
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed the code and it works like a charm. Thanks for your work!

But I got a question, it has only partly something to do with your code, but I'm sure you can point me into the right direction.

You gracefully included the YouTube buttons, but I don't know how I can make them appear on my forum, when I go to "advance reply" like it is done on this board:



What option do I have to edit in order to make the button show up there?

Thanks in advance!
Reply With Quote
  #117  
Old 02-28-2010, 07:27 AM
Fangs404 Fangs404 is offline
 
Join Date: Oct 2008
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cayne View Post
Installed the code and it works like a charm. Thanks for your work!

But I got a question, it has only partly something to do with your code, but I'm sure you can point me into the right direction.

You gracefully included the YouTube buttons, but I don't know how I can make them appear on my forum, when I go to "advance reply" like it is done on this board:



What option do I have to edit in order to make the button show up there?

Thanks in advance!
When you add the BB Code, just make sure "Button Image" is set to the correct path.
Reply With Quote
  #118  
Old 04-01-2010, 06:47 PM
AllinJac AllinJac is offline
 
Join Date: Nov 2009
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think you guys were referring about this:

When you have a video and you have other Javascript items there is an issue because the window for the video will appear OVER the window of any other item you have on the page and it looks off...

I know exactly how to fix it if you use HTML... I also know for sure that we could create some kind of CSS addition that would allow for this to be done across the board as apposed to having to change the code each and every time...

Code:
<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/afktJyLhO7Y&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="wmode" value="transparent"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/afktJyLhO7Y&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340" wmode="transparent"></embed></object>
The key is wmode="transparent and that if used as HTML will make it go behind the page or be transparent behind other we items...

If anyone is capable of doing a CSS addition that we could have this wmode="transparent automatically work with the [youtube] video embed that would be just awesome!!!

THANKS
Reply With Quote
  #119  
Old 04-02-2010, 03:17 AM
AllinJac AllinJac is offline
 
Join Date: Nov 2009
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by segwayon View Post
I noticed that when viewing a thread with this BBcode embedded YouTube video that the "Thread Tools"/"Search this Thread"/"Rate Thread"/"Display Mode" drop-down menus get covered up by the video when those menus are clicked on. All I can see are the first two menu drop-down options. (Most of our embedded videos are contained in their own threads, so the videos are always in post #1 of each of the video-forum threads. If the videos were only within posts #2 or greater then this issue wouldn't happen, since the thread menu links are immediately above post #1.)

Is there a way to make sure that the YouTube video doesn't get placed on the top-most layer of the thread?

YES I got it fixed I had the exact same issue and I was trying to figure out where to put the code to take care of it globaly... And silly me did not think of looking in the BB Code in the ADMIN CP

So for sure this works

<object width="425" height="350"><param name="wmode" value="transparent"><param name="movie" value="http://www.youtube.com/v/JFwCCL0Vh6U"></param><embed src="http://www.youtube.com/v/JFwCCL0Vh6U" type="application/x-shockwave-flash" width="425" height="350" wmode="transparent"></embed></object>

Just go to the BB Code in Admin CP and edit the page...

Place the above text in there and you are GOLDEN!

Wow this is cool this is the first time I have actually helped someone fix something rather then crying and looking for someone to repair my bad fixes LOL!!!

Hope this helps!!!
Reply With Quote
  #120  
Old 12-17-2010, 02:54 AM
LOKIN510051's Avatar
LOKIN510051 LOKIN510051 is offline
 
Join Date: Mar 2009
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

muy bueno gracias
Reply With Quote
  #121  
Old 12-27-2010, 08:34 AM
Suiram Suiram is offline
 
Join Date: Jan 2009
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Fangs404 View Post
OK, HD videos will work again. I had to change &fmt=22 to &hd=1.
cool, so i can finally (again) have youtube clips that are high-def, automatically play @720. but is there a specific code that plays the clip @1080? (yes, obviously the clip would have that resolution). just for kicks, i tried &hd=0 & &hd=2 and that just plays them @360.

in fact, is there a specific number or code for all available resolutions? ie: is there one for 480?

thanks,
Reply With Quote
Reply


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:32 PM.


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.05240 seconds
  • Memory Usage 2,335KB
  • Queries Executed 26 (?)
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
  • (1)bbcode_code
  • (1)bbcode_html
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • 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