Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

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
  #182  
Old 12-17-2006, 10:15 PM
Murty's Avatar
Murty Murty is offline
 
Join Date: Dec 2005
Location: South Australia
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there someway that this can be used for like User Profiles? so they just need to insert the link and a profile field and it would show up in their profile?
Reply With Quote
  #183  
Old 12-18-2006, 12:42 AM
Protonus Protonus is offline
 
Join Date: Aug 2005
Location: Rochester, NY
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Viper007Bond View Post
Then how would it tell them apart if only the ID was entered?

As for the other sites, Break.com's embed code has nothing in common with the URL you view the video at, so it's out. Streetfire is doable. fquick.com wouldn't be used by many people, so it's not worth my time. ebaumsworld is also nearly there (is it really that hard to link to the video rather than embed it?).
I'm awaiting streetfire support before I install this one.. half of the streaming video posted on my site is from streetfire... the rest is likely youtube.

AS for a common tag, thats what Anymedia does, unfortantly it's still beta. I'd rather lose the ability to have it just play based on ID, to gain the ability to type one tag and have to enter the full URL.
Reply With Quote
  #184  
Old 12-18-2006, 10:05 AM
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 kellogs View Post
Thank you for the great mod but it does not display the youtube inline video instead it is showing the link with youtube tag.

This is the link

http://www.fishingouting.com/forums/...html#post12258

Any idea?

TIA
-K
Quote:
Originally Posted by kellogs View Post
Sorry mate, i have clicked installed

Please share some ideas

Thank you
-K
You have color BBCode inside your [youtube] tags. As a result, the plugin aborts the replacement as it'd otherwise break the HTML.

Remove it and it should work fine.

Code:
[YOUTUBE]http://www.youtube.com/watch?v=90M39W9FIKA[/YOUTUBE]
Reply With Quote
  #185  
Old 12-18-2006, 10:12 AM
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 Murty View Post
Is there someway that this can be used for like User Profiles? so they just need to insert the link and a profile field and it would show up in their profile?
No, that'd be totally separate. A custom profile field where they enter the ID and then a profile template edit would probably get the job done.

Something like this:

Code:
<if condition="$post['field9']"><object width="425" height="340" type="application/x-shockwave-flash" data="http://www.youtube.com/v/$post['field9']"><param name="movie" value="http://www.youtube.com/v/$post['field9']" /><param name="wmode" value="transparent" /></object></if>
Reply With Quote
  #186  
Old 12-18-2006, 10:15 AM
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 Protonus View Post
I'm awaiting streetfire support before I install this one.. half of the streaming video posted on my site is from streetfire... the rest is likely youtube.

AS for a common tag, thats what Anymedia does, unfortantly it's still beta. I'd rather lose the ability to have it just play based on ID, to gain the ability to type one tag and have to enter the full URL.
One tag for all full URLs is possible, but frankly it's a pain in the ass and I don't see the huge advantage of it. I mean it's not that hard for a user to use a different tag per and it ensures that some unsupported site isn't tried.

I will make sure to add Streetfire in the recode that I'm currently working on.
Reply With Quote
  #187  
Old 12-21-2006, 11:15 PM
RaceJunkie RaceJunkie is offline
 
Join Date: Jun 2005
Posts: 371
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
this is the code I used in my post.

Code:
[YOUTUBE]frRx1CD-gts[/YOUTUBE]
If you look at my homepage you can see that the Video does not show up.

Did I miss something?
Late Model Rollover Crash (VIDEO)
www.localracechat.com
Reply With Quote
  #188  
Old 12-22-2006, 09:53 AM
Viper007Bond's Avatar
Viper007Bond Viper007Bond is offline
 
Join Date: Oct 2006
Location: Portland, OR, USA
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

All my plugin does is transform the full URL into just the ID so the built in BBCode parser can use the custom BBCode this plugin adds to it can replace it with some working HTML.

So, since you're directly entering the ID and you're using vBAdvanced which doesn't even make use of my plugin, all you're left with is the custom BBCode that's been added to the list in the admin area by my plugin.

So, did you modify the BBCode at all there or something? I ask 'cause this is the HTML that should be displayed:

HTML Code:
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="400" style="margin:10px 0">
<thead>
	<tr>
		<td class="tcat" colspan="2" style="text-align:center">
			<a href="http://www.youtube.com/watch?v=hl2UUunlI2Q" title="View this video at YouTube in a new window or tab" target="_blank">YouTube Video</a>
		</td>
	</tr>
</thead>
<tbody>
	<tr>

		<td class="panelsurround" align="center">
			<object width="425" height="340" type="application/x-shockwave-flash" data="http://www.youtube.com/v/frRx1CD-gts">
				<param name="movie" value="http://www.youtube.com/v/frRx1CD-gts" />
				<param name="wmode" value="transparent" />
				<em><strong>ERROR:</strong> If you can see this, then <a href="http://www.youtube.com/">YouTube</a> is down or you don't have Flash installed.</em>
			</object>

		</td>
	</tr>
</tbody>
</table>
Instead, this is what you get (ignore the lack of line breaks, that doesn't matter):

HTML Code:
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="400" style="margin:10px 0"> <thead> <tr> <td class="tcat" colspan="2" style="text-align:center"> <a
Yeah, it just stops there...
Reply With Quote
  #189  
Old 12-22-2006, 03:37 PM
RaceJunkie RaceJunkie is offline
 
Join Date: Jun 2005
Posts: 371
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No I installed it per the instructions.. Uploded the plugin then the images. I made no changes to the custom bb codes at all.
Reply With Quote
  #190  
Old 12-22-2006, 07:37 PM
SonicGT's Avatar
SonicGT SonicGT is offline
 
Join Date: May 2006
Location: Chicago Burbs
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I added the mod, seems to work only if I do not use the full url, when I use the full url I am getting the box, but not video
Reply With Quote
  #191  
Old 12-23-2006, 01:00 AM
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 RaceJunkie View Post
No I installed it per the instructions.. Uploded the plugin then the images. I made no changes to the custom bb codes at all.
Weird. Does it work on your actual forum?
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 03:30 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.07962 seconds
  • Memory Usage 2,330KB
  • 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
  • (5)bbcode_code
  • (2)bbcode_html
  • (7)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