The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Auto Youtube Link-Converter Details »» | |||||||||||||||||||||||||||||||||
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 Code:
<a href="http://www.youtube.com/watch?v=somecode&some=params">http://www.youtube.com/watch?v=somecode&some=params</a> 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. Code:
Changes since 1.3: - Now works properly on iPad Changes since 1.2: - Supports mobile devices with fallback-display if browser doesn't support flash/embed codes - Allows the user to specify the above mentioned replacement code for mobile browsers - Minor improvements & Fixes Changes since 1.1: - Moved regular expression and index position into admincp settings to allow easier changing in the future - supports new youtube link format: "http://youtu.be/*somevideocode*" Changes since 1.0: (or: why should I download that mod again?) - Added Link parsing in post-preview mode and in post reviewbits (the latest posts you see under the new reply form) 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. Download Now
Show Your Support
|
14 благодарности(ей) от: | ||
beertruck, CuteC@t, davew, donkspurs, Duke49th, GhostHunter2010, GoMaX, iiioroh, L2Insomnia, mapleleaffans, orangecopper, SteveBoogie, Toorak Times |
Comments |
#72
|
||||
|
||||
Yes, that is the code which gets displayed, if a mobile browser is detected. The reason is, that mobile browsers can't potentially display the default vbulletin code, therefore nothing gets displayed.
The above code you posted is a replacement-code, which works with most mobile browsers (iphone for example). However, the ipad seems still to have trouble displaying the fallback code. So if you put the code snipped I posted a few posts above into the option field, you can ensure, that every mobile browser only displays the link instead of an embed, which he potentially can't display. This is just a temporary solution until I figured out why the ipad can't display the fallback code and I might find a better replacement |
#73
|
|||
|
|||
Quote:
Regards, Doug |
#74
|
||||
|
||||
|
#75
|
|||
|
|||
Understood ...
As you've noted, it still doesn't display on the iPad (just blank post). I also checked my wife's iPad-2 and it doesn't work. Finally, I went back and checked the iPhone4 with just that single line of "FallBack Content" and it works on the one video example I posted earlier, after having removed the old code ... Code:
<object type="application/x-shockwave-flash" data="http://www.youtube.com/v/%1$s" width="480" height="360"> <param name="movie" value="http://www.youtube.com/v/%1$s" /> <param name="quality" value="high" /> <param name="allowFullScreen" value="true" /> <!-- Fallback content --> <a href="http://www.youtube.com/watch?v=%1$s"> YouTube Video:<br /><img src="http://img.youtube.com/vi/%1$s/0.jpg" width="240" height="180" alt="Click here to view on youtube" /></a> </object> ie: Code:
[video=youtube;W7pl0-vaCAg]http://www.youtube.com/watch?v=W7pl0-vaCAg[/video] I thought we had gone through the routine of passing the database through your utility that removed all those? .. or, was that just the mod [youtube] type ones? Regards, Doug |
#76
|
||||
|
||||
The script only removed those with the [youtube] tag.
The Issue I see at the moment is, that the standard vbulletin video code doesn't display on ipads, right? > Just disable the mod, add a youtube video in a post via the vbulletin video-button, view the page and see if it appears. If not (as expected), the problem is with the embed code vbulletin uses and my mod also. Right now I'm trying to fix that by looking for an embed code which modern browsers can display, and mobile browsers displaying some fallback thingy so they can at least see anything. I own an iPhone 4, so I can check that, but I have to wait a few days until I get my hands on an iPad 2. We'll see if there is something I can do, worst case will be disable the post replacement for mobile browsers completely, so they will only see a link to the youtube vid. |
#77
|
|||
|
|||
it worked for the first post now it doesn't work just tired isn't converting it any idea why my other file was converted?
|
#78
|
|||
|
|||
Quote:
Quote:
Quote:
Thanks for your efforts ... :up: Regards, Doug |
#79
|
|||
|
|||
Awesome release, thank you very much!
|
#80
|
||||
|
||||
Quote:
When you create a new post with just one or more vbulletin links (no tag, no video-embed) and view this post, do they get converted or does it stay as a link? |
#81
|
|||
|
|||
stays as a link bro
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|