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]


All times are GMT. The time now is 11:21 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.01212 seconds
  • Memory Usage 1,739KB
  • 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_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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