Log in

View Full Version : Mini Mods - Auto Youtube Link-Converter


Pages : 1 [2]

Techno Cowboy
03-14-2016, 10:34 AM
Have this installed and working as should on vB 4.2.4 B1! :D

Like your hack sir...indeed! :up:

miguellu
04-30-2016, 02:23 PM
Hi! Is there any way to enable fullscreen?

justasiam
05-01-2016, 10:53 PM
Does this work with those adding articles in the 4.2.xx Suite?

tharbin
05-02-2016, 04:06 PM
Works as intended. Thanks a ton

BadgerDog
07-07-2016, 10:19 AM
Has anyone else had any issues with users complaining that they are unable to view videos in-line on the site using this mod, yet when they go to the actual YouTube site, they view fine? (see pics)

Also, is there going to be an update to this excellent mod to support API 3.0 from YouTube and also better support the Youtu.be links?

Thanks..

Regards,
Doug

Disasterpiece
07-08-2016, 01:47 PM
Hi,

Conflicts may come from any conflicting javascript includes, like for example different jqueries or anything else really. Hard to say without js-console output.

Mod upgrade likely won't happen, as I don't have access to/interest in vb at this point.

Daniel
10-10-2016, 02:47 AM
How can I get this working in the blogs section too?

bosanci28
10-15-2016, 02:06 AM
Works in vb4.2.3
Thanks.

mobster46
02-05-2017, 08:21 AM
How I can png link convert?

dirkji
02-06-2017, 07:30 AM
Since last week all YouTube embeds show up as black boxes on IE. Chrome and Firefox work fine. Does anyone have an idea what's causing this?

alexm
02-07-2017, 11:28 AM
Since last week all YouTube embeds show up as black boxes on IE. Chrome and Firefox work fine. Does anyone have an idea what's causing this?

I think it is in the vBulletin template 'bbcode_video' (it's nothing to do with this mod). If you change //www to https://www IE should work. I just did the same to my vBulletin 4.2.3 and looked here first!

edit: Now it doesn't work again :mad:

edit2: It's something weird with IE debugger, when I open Developer Tools and then refresh it opens the Youtube fine!

dirkji
02-08-2017, 08:51 AM
edit2: It's something weird with IE debugger, when I open Developer Tools and then refresh it opens the Youtube fine!

Yes, I noticed that as well.

When I change:

<meta http-equiv="X-UA-Compatible" content="IE=9">

to

<meta http-equiv="X-UA-Compatible" content="IE=Edge">

the videos work fine, but then my image uploader stops functioning.

Any other ideas?

dirkji
02-09-2017, 06:57 AM
It seems to have fixed itself, probably an IE update...

IggyP
09-15-2017, 07:55 PM
hmm...noticed ipad mini retina not showing the embeds...any ideas of that? i see in the notes it was meant to be working on at least some form of tablet..

in fact is there a simply all around better version of this? seems like there would be, just didnt see it yet...better to not use flash at all isnt that possible by now?


EDIT:
i removed the flash part of the code....it now loads the embeds into posts....but if you try to play them, it redirects to youtube...anyone know what is the better replace code than this for mobile?

<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="480" height="360" alt="Click here to view on youtube" /></a>

IggyP
09-15-2017, 09:00 PM
got it...

<iframe id="ytplayer" type="text/html" width="640" height="360"
src="https://www.youtube.com/embed/%1$s"
frameborder="0"></iframe>

djbaxter
09-15-2017, 10:01 PM
Posting just for my own clarification the solution from IggyP above...

FIND near line 130 in XML file:

<defaultvalue><![CDATA[<object type="application/x-shockwave-flash" data="http://www.youtube.com/v/%1$s" width="480" height="360">



REPLACE with:

<defaultvalue><![CDATA[<iframe id="ytplayer" type="text/html" width="640" height="360"
src="https://www.youtube.com/embed/%1$s" frameborder="0"></iframe>




Note: This sort of works for iPad. However, it leaves a lot of empty white space with a thumbnail and the fallback link to view on Youtube near the bottom of the post.

On iPhone, it just creates a lot of empty white space, although the video is viewable if I switch to desktop or iPad.

Did I do something incorrectly?

IggyP
09-15-2017, 11:49 PM
its just a simple code i found as alternate to the flash...i didnt try it by mobile on phone size, but perhaps its the size settings in the code? i wanted to keep it sort of big for "mobile" tablet but of course phones maybe thats a problem? hmm


theres other options that can be added as well of course.. >> https://developers.google.com/youtube/player_parameters


also this quote from the source: which suggests the sizes 240 and 135 instead of what i used..fwiw...

Use the iframe-embedded version of the player instead of the Flash one. The embedded version is smart enough to render the appropriate player based on the device (ie, it may render the Flash version for phones like the Android that support it, or the HTML5 version for iPhone).

<iframe
width="240" height="135"
src="http://www.youtube.com/embed/videoid"
frameborder="0" allowfullscreen>
</iframe>

EDIT: fwiw, testing with an s5 and ipad mini retina i cannot reproduce, seems to work proper and scale and everything but thats not necessarily saying much

EDIT2: also dont forget this mod has options....so dont really need to hack the xml ;)

djbaxter
09-16-2017, 10:19 PM
EDIT2: also dont forget this mod has options....so dont really need to hack the xml ;)

D'oh!

And that explains why it wasn't working for me. When I go to the options, it still has the old Flash code.

Going to try editing that now.

djbaxter
09-16-2017, 10:52 PM
And your original fix when I edit it in options works just fine. I tweaked the fallback it just a little for formatting so now the complete contents of the mobile text box in Options looks like this:

<iframe id="ytplayer" type="text/html" width="640" height="360"
src="https://www.youtube.com/embed/%1$s"
frameborder="0"></iframe>
<param name="movie" value="http://www.youtube.com/v/%1$s" />
<param name="quality" value="high" />
<param name="allowFullScreen" value="true" />
<!-- Fallback content -->
<br /><br/><a href="http://www.youtube.com/watch?v=%1$s">
Click here to watch video on YouTube<br /><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>

Thank you, IggyP, both for the fix and for helping me through my D'Oh! moment. :)

alexm
05-14-2018, 01:32 PM
I?ve got a problem... over the last 2 weeks (maybe longer!) videos appear as a black window if you use IE11. What it appears to be is:


<meta http-equiv="X-UA-Compatible" content="IE=9" />


in headinclude.

If you remove it Youtube embeds correctly... but unless you have this added then people can?t press enter if they have anything but simple text turned on.

I don?t know whether it is IE?s fault or YouTube?s fault (probably IE :rolleyes:)... does anyone else have this problem?

Alex

rory2000
06-12-2019, 07:08 AM
Yes I have the same issue also ... do we know is there a fix or an update ?

SteveBoogie
11-23-2019, 07:43 PM
Thanks for updating the mod to accommodate the mobile links brother