vBulletin Mods

The Official vBulletin Modifications Site

YouTube URL Converter/Fix by BOP5 (replaces youtu.be with youtube.com)
by BirdOPrey5
26 Jul 2011 13:11

1 Attachment(s)
Version 1.2
1.0 - Initial Release
1.1 - Bugfix
1.2 - Bugfix

This is a very simple mod that will convert any links to videos on youtu.be to full www.youtube.com URLs.

This will be done everytime a new post is created or edited.

The purpose of this mod is to allow mods like AME 2.5 to work properly with the new shorter youtu.be share URLs.

It is preferable to use the original www.youtube.com URL because it will work with video titles and retain deep embedding support.

There are no options, just import the prodct in the usual way and it is installed and working.

If you ever need to disable it, disable the product from your Product Manager in Admin CP. Or uninstall.



If someone posts:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

It will be converted to:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

before being saved. This will allow a mod like AME to convert it to an embdded video using the standard YouTube.com definition.

This mod does NOT embed videos. It is only useful if you run a mod like AME already.

This mod works on Vb 3.6, 3.7, 3.8, and 4.x.

Please Mark as Installed if you use this. :)

BirdOPrey5 26 Jul 2011 13:12


Wonksta 26 Jul 2011 13:56


BirdOPrey5 26 Jul 2011 14:17

FYI This mod does work on VB 4.x but I don't know why you would need it.

rinkrat 30 Jul 2011 00:08

Works as advertised! Thank you, sir!

EddyMaxx 05 Sep 2011 14:11

Great mod. Works great!

BirdOPrey5 25 Sep 2011 12:49

Updated to version 1.1 - Fixed bug where youtube videos with dashes (-) in their ID would not be converted.

Max Taxable 25 Sep 2011 12:58

Been using this since Day One, works great. I appreciate the work!

cstreater 07 Nov 2011 19:14

I downloaded this mod, removed the duplicate pattern match(?), changed the embed code to display HD when available, and added the no-cookie and https option YouTube now offers. I attached the XML if you're interested.

Anyway, your converter seems to work well in conjunction with this mod, but for some reason it doesn't convert the first post of a new thread unless I edit and save it after posting.

In fact, even without my mod it still exhibits this behavior in my test environment running a clean version of vB 3.8.7.

I take it this hasn't happened to you?

BirdOPrey5 07 Nov 2011 19:48

You are right, it wasn't converting on first posts. Looks like I had the plugin for new threads accidentally assigned to another mod so it didn't export with this mod. Uploaded version 1.2 which fixes this issue, now includes both plugins. Thanks. :up:

Edit - Had to remove your attachment, you can't redistribute other peoples mods, even if you edit them.

cstreater 07 Nov 2011 20:03

OMG thank you! The mods you've created for our forum are definitely appreciated. Youtu.be links have definitely been a pain in my side.

The other guys I work with also love your PHP script listing all the forums & ID's. Due to the size of Android, and the number of devices they keep churning out, we have way more than I'd like to admit. Anyway, that's a little off topic from this thread. Bottom line is, thanks.

BirdOPrey5 07 Nov 2011 20:23

You are welcome. :)

Max Taxable 11 Nov 2011 15:50

Hey BOP5, this modification does not work in private messages, just so's ya know. Perhaps it needs a different hook location besides "postdata_presave" ??

BirdOPrey5 12 Nov 2011 09:50

That is true, and yes it would need a different hook- will have to investigate.

BirdOPrey5 12 Nov 2011 10:15

If anyone wants this to work on PMs- go to your Admin CP -> Plugin Manager -> Add New Plugin

product: YouTube URL Converter by BOP5

hook: private_insertpm_process

title: YouTube Fix - PMs

Exec. Order: 5

Set the php code to:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Set ACTIVE to YES and hit "Save"
This will do the conversion in PMs too. I didn't make it an update because not everyone may want to do it with PMs. One day if I add options to this product I can make it something you may enable or disable.

All times are GMT. The time now is 10:32.

Powered by vBulletin® Version 3.8.12
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.