vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=261296

Auto Youtube Link-Converter
by Disasterpiece
01 Apr 2011 16:35

4 Attachment(s)
So basically this is a total easy-to-implement plugin, which converts standard youtube links to video-embeds on the fly without urging users to use the video-button because I think it is unnecessary.


On post display, the plugin checks if the post contains at least 1 youtube link in the form of

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

and converts them using the default vB video bbcode parser.

Code can be modified to fit your needs, altough there shouldn't be much to add.
If you're the special performance-freak, I'm curious if you can enhance data/query-performance. So let me know if you do.

INSTALL:

- Download attached XML File and import it as an addon.


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


Now every post containing youtube-links should display the embedded video instead.
Works with any number of youtube-links and any kind of text surrounding them.

Let me know if you have trouble/questions.

voglermc 01 Apr 2011 17:55

Sweet! Nominated!

fragov 01 Apr 2011 18:06

You da man! :)

fragov 01 Apr 2011 19:00

How it can be changed to replace link to bbcode on newpost & newreply not in quotes?

New Joe 02 Apr 2011 04:30

Works as it says.

Sforums 02 Apr 2011 13:14

Great job!
5 star and nominated.

grc 02 Apr 2011 14:21

10 second install! Works as described. Good job!

I wonder if the code can be modified to do the same with links to Picasa web albums, presenting them as slide shows?

Disasterpiece 02 Apr 2011 20:40

@grc: sure it can. It basically checks for an occurence in the html-string, grabs a part of it (in this case the video-id) and replaces it with another string.
If you can give me specific information on how that picasa thing is formed, I can write you a plugin for that purpose.

thr45h3r 02 Apr 2011 20:55

Thanks works great

Gemma 02 Apr 2011 23:12

Thanks a lot :)

SpeedyHire 03 Apr 2011 09:19

nice one, thanks

ProFifaLeagues 03 Apr 2011 10:52

Will this work below 4.1.2????

Disasterpiece 03 Apr 2011 18:18

Quote:

Originally Posted by rammieone (Post 2180354)
Will this work below 4.1.2????

It should work, yes. Only one way to find out :P
I started and developed the plugin on vB 4.1.2 so I can't guarantee it works with older versions.

zelnik 03 Apr 2011 18:41

brilliant thanks

grc 03 Apr 2011 18:43

Quote:

Originally Posted by Disasterpiece (Post 2180193)
@grc: sure it can. It basically checks for an occurence in the html-string, grabs a part of it (in this case the video-id) and replaces it with another string.
If you can give me specific information on how that picasa thing is formed, I can write you a plugin for that purpose.

Cool - here's a link to a slide show:


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

username: nazarenealvin
albumname: 2010NewCross

Is it do-able?


All times are GMT. The time now is 19:03.

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.