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.
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]
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.
A CMPS module would be a great addition for this mod.
Also, if you could have your own player instead of using Google's and YouTube's, it would be a real nice option.
Sorry, I don't use vBadvanced and wouldn't know where to start.
As for your own player, I'm not sure if YouTube & Google Video would appreciate that or not. I think they want you to use their Flash player.
Quote:
Originally Posted by xtrass
Viper, great mod. I also run a SMF forum, version 1.1 RC3,
any chance you can port this over for 1.1RC3?
They only have a similar mod for 1.1RC2 and all the suggested hacks to get it to work on RC3 fails. Plus you need to install 2 mods to get what your VB mod does!
I know your mod would be greatly appreciated for SMF
Any chance it happening?
Nope, no chance, of me making a version that is. I hate SMF and will never install it, sorry.
Quote:
Originally Posted by RidinHighSpeeds
When you click the YouTube icon for example, it brings up a window where you enter in the URL of the video.
Now if I submit my reply without entering in a title within the tags, it does not display the video. I would recommend another pop-up window asking the user to enter in a description or title.
I was unaware such a thing happened. I only use Firefox and when you click the button for a custom BBCode, it just inserts the BBCode into the write box.
Either way, my plugin doesn't add the button, vB does, so there's not much I can do about it AFAIK.
Quote:
Originally Posted by redlabour
Attention :
If you have used something like [gv] before this Update and want to change now all old Codes to [gvideo] operate this SQL Querie.
Code:
UPDATE vb3_post SET pagetext = REPLACE(pagetext, '[gv]', '[gvideo]');
UPDATE vb3_post SET pagetext = REPLACE(pagetext, '[/gv]', '[/gvideo]');
UPDATE vb3_post SET pagetext = REPLACE(pagetext, '[GV]', '[gvideo]');
UPDATE vb3_post SET pagetext = REPLACE(pagetext, '[/GV]', '[/gvideo]');
UPDATE vb3_post SET pagetext = REPLACE(pagetext, '[Gv]', '[gvideo]');
UPDATE vb3_post SET pagetext = REPLACE(pagetext, '[/Gv]', '[/gvideo]');
Same for old [anymedia] or [yt] Codes.
Attention - maybe you have to change Tableprefix.
@Viper007Bond - include this to Installinstructions please or use it for coding a AdminCP Option.
Yeah, when I have a chance to release an update, I'll allow you to easily change the BBCode.