Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Embed XHTML valid YouTube and Google Video into your posts Details »»
Embed XHTML valid YouTube and Google Video into your posts
Version: 2.2.0, by Viper007Bond Viper007Bond is offline
Developer Last Online: Dec 2017 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 3.6.8 Rating:
Released: 11-04-2006 Last Update: 10-23-2007 Installs: 1040
Uses Plugins
Re-useable Code Additional Files  
No support by the author.

==============================
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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #252  
Old 04-14-2007, 06:48 AM
tehPARADOX tehPARADOX is offline
 
Join Date: Feb 2007
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RidinHighSpeeds View Post
Now if I submit my reply without entering in a title within the tags, it does not display the video.
I am having this particular problem, & although you've replied to it; it didn't really address how to fix this issue.

Perhaps you or the plugin forgot to add in the custom BB code for YouTube Video with No Title, such as the Google's Google Video with No Title BB code. So posting a youtube video without title will not display.

EDIT: Did a complete uninstall and reinstall, now missing custom bb code is added. Not sure why it didn't have it in the first place, so please disregard this post.
Reply With Quote
  #253  
Old 04-15-2007, 08:10 PM
yaworski yaworski is offline
 
Join Date: Feb 2006
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is great but you should consider adding something like this:
Add this to the <tr> where the flash object is in.
Code:
style="display: none"
and add this just after that one (that with flash object)
Code:
	<tr>
		<td onclick="this.parentNode.style.display = 'none'; this.parentNode.parentNode.getElementsByTagName('tr')[0].style.display = '';">
		Click here to display the video.
		</td>
	</tr>
I tested it on FF2.0 and IE7 and this works good. Don't know if it works on IE6 yet, because I don't have it anymore. Opera should be fine.

I checked this on FF with Temper Data extension (shows requests that are made by FF) and the flash is not loaded when it is not displayed (display: none) and loads just after clicking on the predefined text. I know that not everyone will want that change so maybe you could add this as an alternative version? This would save users some bandwidth when they open thread with many videos (not everybody wants to watch all the videos).

----edit----

Oh and one more thing. I think that using opaque wmode in flash is slightly faster than transparent (it doesn't need to check if flash has transparent parts). This still works like transparent in context of dynamic html (works well with z-index).
Reply With Quote
  #254  
Old 04-17-2007, 04:21 PM
taumau taumau is offline
 
Join Date: Aug 2006
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How about DailyMotion videos?
Reply With Quote
  #255  
Old 04-19-2007, 01:25 PM
Viper007Bond's Avatar
Viper007Bond Viper007Bond is offline
 
Join Date: Oct 2006
Location: Portland, OR, USA
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by taumau View Post
How about DailyMotion videos?
Sadly the embed code has nothing in common with the URL in your address bar, so it makes it rather hard for the average user.
Reply With Quote
  #256  
Old 04-21-2007, 05:14 AM
Da`Nacho Da`Nacho is offline
 
Join Date: Mar 2002
Location: Fort Worth, Texas
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great work, but you need to make this more aware of vBulletin's NOPARSE bbCode.

I've noticed from your example page that you don't seem to be aware of it either. (You've got spaces in your example bbcode to avoid parsing instead). If you wrap code in [noparse][/noparse] tags then vBulletin will not parse any bbCode commands inside them. This was added in 3.5.x and up. It's VERY handy for showing examples to your forum members!

I've noticed (when citing examples for the members of my forum) that if you wrap your bbcode (gvideo] or [youtube] in noparse tags, and you have a Youtube or Google URL inside, the Google Video or Youtube document id will still be parsed out of it and displayed instead of the entire URL.

so for example:

[noparse][youtube]http://www.youtube.com/watch?v=XhgVIbO83o4[/youtube][/noparse]

will actually display

[noparse][youtube]XhgVIbO83o4[/youtube][/noparse]
Reply With Quote
  #257  
Old 04-27-2007, 11:17 PM
tanyeri24 tanyeri24 is offline
 
Join Date: Feb 2005
Location: Switzerland
Posts: 229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Breathex View Post
i also need this as soon as possible please
here too
Reply With Quote
  #258  
Old 05-06-2007, 04:48 PM
VG Pros VG Pros is offline
 
Join Date: Mar 2007
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed this on 3.6.5 and when I highlight the url and then click on the YouTube button it says it puts [youtube]http://example.com[/youtube]. Then I post it and all I get is a link. Then I went to edit it and this is what it looks like:

[youtube]
[/youtube]
[youtube][url]http://www.youtube.com/watch?v=Q7Us6a-8cck[url][/youtube]
Reply With Quote
  #259  
Old 05-08-2007, 01:15 AM
Queball_Beast's Avatar
Queball_Beast Queball_Beast is offline
 
Join Date: Mar 2006
Location: Sunny Florida
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I too am having this same problem with 3.65 is there a fix for this or a reason why it is happening?
Quote:
Originally Posted by VG Pros View Post
I installed this on 3.6.5 and when I highlight the url and then click on the YouTube button it says it puts [youtube]http://example.com[/youtube]. Then I post it and all I get is a link. Then I went to edit it and this is what it looks like:

[youtube]
[/youtube]
[youtube][url]http://www.youtube.com/watch?v=Q7Us6a-8cck[url][/youtube]
Reply With Quote
  #260  
Old 05-08-2007, 10:53 PM
bornoffire bornoffire is offline
 
Join Date: Apr 2007
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Queball_Beast View Post
I too am having this same problem with 3.65 is there a fix for this or a reason why it is happening?
Make that 3
Reply With Quote
  #261  
Old 05-08-2007, 11:07 PM
Queball_Beast's Avatar
Queball_Beast Queball_Beast is offline
 
Join Date: Mar 2006
Location: Sunny Florida
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I read through all threads and stil have not found a fix, does anyone have a fix for this issue?

[
Quote:
youtube]
[/youtube]
[youtube][url]http://www.youtube.com/watch?v=Q7Us6a-8cck[url][/youtube]
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 02:57 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.08605 seconds
  • Memory Usage 2,320KB
  • 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
  • (4)bbcode_code
  • (6)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
  • (2)pagenav_pagelinkrel
  • (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