vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   BB Code Enhancements - Embed XHTML valid YouTube and Google Video into your posts (https://vborg.vbsupport.ru/showthread.php?t=130868)

Viper007Bond 11-04-2006 10:00 PM

Embed XHTML valid YouTube and Google Video into your posts
 
==============================
DON'T FORGET TO CLICK INSTALL!
==============================


Just thought I'd share what I did to allow my users to embed YouTube and Google Video videos into posts on my forum. This is my very first mod I've made since switching to vB, so forgive me if I screwed something up. :)


Demo:

http://forums.finalgear.com/test-for...-thread-14892/

The black bar will be different for you as it'll match your theme (it uses the same style as the whole quick reply box).


Upgrading from v1.x:

Just remove the plugin you added before (manage plugins -> delete) and then continue on to the installation instructions.

If you already have v2.x installed, you do NOT need to do this.


Installation:

Download and install the attached product. It will automatically create the new custom BBCode and add in some filtering plugins.

Save the two attached images and upload them to /images/editor/.


Usage:

Here's some examples:

Code:

[youtube]http://www.youtube.com/watch?v=hl2UUunlI2Q[/youtube]
[youtube]hl2UUunlI2Q[/youtube]
[youtube="http://www.youtube.com/watch?v=hl2UUunlI2Q"]Aston Martin Crash[/youtube]
[youtube="hl2UUunlI2Q"]Aston Martin Crash[/youtube]

Code:

[gvideo]http://video.google.com/videoplay?docid=3688185030664621355[/gvideo]
[gvideo]3688185030664621355[/gvideo]
[gvideo="http://video.google.com/videoplay?docid=3688185030664621355"]1980's Izuzu Gemini Advertisement[/gvideo]
[gvideo="3688185030664621355"]1980's Izuzu Gemini Advertisement[/gvideo]

Using vBAdvanced? It lacks the hook this plugin uses apparently, so if you wish to use this plugin with it, you need to use only the video ID and NOT the full URL for it to display correctly. Nothing I can do about it, it's vBAdvanced's fault.


How do I customize the look of the new box thingies?

Just edit the new custom BBCode items. It's in the admin area, near the bottom.

Viper007Bond 11-05-2006 10:08 PM

CHANGELOG:
  • v2.2.0: new feature -- increase video size (to 150%)
  • v2.0.2: update to YouTube video sizes to match YouTube
  • v2.0.1: minor bug in the resetting invalid BBCode calls plugin
  • v2.0.0: complete recode from the ground up!
  • v1.0.1: allow for no "www." in YouTube URLs (thanks alahnae!)
  • v1.0.0: initial release

boyrules 11-05-2006 10:43 PM

Everything Is Looking Fine ..

..but The yutube video is not showing in the post....

please fix it

abramelin 11-05-2006 10:48 PM

too much tables :/ why dont you use less tables or make tableless . if you optimize the code then it will be great.

Wachtmeister 11-05-2006 11:14 PM

Isn't it easier to define a custom vbCode?

I have one to insert Youtube Videos very easy:

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

SuperJETT 11-05-2006 11:37 PM

Very nice, installed.

Viper007Bond 11-05-2006 11:42 PM

Quote:

Originally Posted by boyrules
Everything Is Looking Fine ..

..but The yutube video is not showing in the post....

please fix it

Link me to a page where it doesn't please so I can see what's wrong. :)

Viper007Bond 11-05-2006 11:42 PM

Quote:

Originally Posted by abramelin
too much tables :/ why dont you use less tables or make tableless . if you optimize the code then it will be great.

Super simple to make it tableless. Heck, you could even just do a standard <object> and nothing else if you wanted. I just used a table to make it match most forums.

Viper007Bond 11-05-2006 11:44 PM

Quote:

Originally Posted by Wachtmeister
Isn't it easier to define a custom vbCode?

That's exactly what I did. However, via the standard vbCode, you cannnot have it accept the full video URL, only the ID. My little snippet of PHP transforms the full URL into a format that vB can handle.

Quote:

Originally Posted by Wachtmeister
I have one to insert Youtube Videos very easy:

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

Yeah, that's exactly what mine does, just with a table for style and no <embed> as that's not valid XHTML.

As said though, you can do any styling/HTML you want, it's the PHP that is the real meat of my little plugin. :)

morrow 11-05-2006 11:59 PM

Someone just posted this the other day.

https://vborg.vbsupport.ru/showthrea...hlight=youtube


All times are GMT. The time now is 07:30 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.01276 seconds
  • Memory Usage 1,744KB
  • 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
  • (2)bbcode_code_printable
  • (4)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