The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Embed XHTML valid YouTube and Google Video into your posts Details »» | |||||||||||||||||||||||||||
Embed XHTML valid YouTube and Google Video into your posts
Developer Last Online: Dec 2017
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] 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
|
Comments |
#302
|
|||
|
|||
updated and works great! thank you!
|
#303
|
||||
|
||||
Quote:
Is there anyway - you can post what part of the html is changed to include the +/- button? Jacquii. |
#304
|
||||
|
||||
Yes, import product, tick the overwrite button. It'll upgrade the existing custom BBCode.
Make sure you ticked the "overwrite" button. |
#305
|
||||
|
||||
Quote:
Code:
<td class="tcat" colspan="2" style="text-align:center"> <span style="float:right;margin-left:5px;cursor:pointer;font-weight:bolder;" title="Increase this video's size" onclick=" if ( this.innerHTML == '+' ) { this.innerHTML = '-'; this.title = 'Reset video size'; this.parentNode.parentNode.parentNode.parentNode.width=638; this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].width=638; this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].height=515; } else { this.innerHTML = '+'; this.title = 'Increase this video\'s size'; this.parentNode.parentNode.parentNode.parentNode.width=425; this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].width=425; this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].height=355; } ">+</span> <a href="http://www.youtube.com/watch?v=... Code:
<td class="tcat" colspan="2" style="text-align:center"> <span style="float:right;margin-left:5px;cursor:pointer;font-weight:bolder;" title="Increase this video's size" onclick=" if ( this.innerHTML == '+' ) { this.innerHTML = '-'; this.title = 'Reset video size'; this.parentNode.parentNode.parentNode.parentNode.width=600; this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].width=600; this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].height=489; } else { this.innerHTML = '+'; this.title = 'Increase this video\'s size'; this.parentNode.parentNode.parentNode.parentNode.width=400; this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].width=400; this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].height=326; } ">+</span> <a href="http://video.google.com/videoplay?docid= |
#306
|
||||
|
||||
EXCELLENT = Thanx so much VIPER - works like a charm.
I just realized I haven't rated this thread - So gave it an excellent rating And a vote for MOTM! Jacquii. |
#307
|
|||
|
|||
How do I get the videos to display centered in each post vs. left aligned - I've gone through and added align="center" in what I thought were the obvious places, but it's not sticking - any help appreciated.
Great job on this update by the way, works great. Thanks. |
#308
|
||||
|
||||
Quote:
Then just close by putting </div> at the very bottom HTH, Jacquii. |
#309
|
|||
|
|||
Quote:
Code:
$vbulletin->db->escape_string('<div align="center"><table class="tborder" cellpadding="6" cellspacing="1" border="0" width="400" align="center" style="margin:10px 0"> Is this the right place? |
#310
|
||||
|
||||
That's horribly wrong
Jacquii. |
#311
|
||||
|
||||
No. Install the product. When it gets installed, it automatically adds in some custom BBCode.
Then just go into your admin area -> Custom BBCode -> edit the new different BBCodes. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|