vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Mini Mods - Auto Youtube Link-Converter (https://vborg.vbsupport.ru/showthread.php?t=261296)

alexm 02-07-2017 11:28 AM

Quote:

Originally Posted by dirkji (Post 2581928)
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

Quote:

Originally Posted by alexm (Post 2582000)
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?

Quote:

<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...

Quote:

<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:

Code:

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

REPLACE with:

Code:

              <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...

Quote:

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).
Quote:

<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

Quote:

Originally Posted by IggyP (Post 2589922)
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:

Code:

<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:

Code:

<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


All times are GMT. The time now is 06:03 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02481 seconds
  • Memory Usage 1,750KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete