vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - Full Screen Button in Youtube embedded Videos (https://vborg.vbsupport.ru/showthread.php?t=238243)

Sadikb 03-13-2010 10:00 PM

Full Screen Button in Youtube embedded Videos
 
1 Attachment(s)
Updated to work with 4.0.6

Hi, a member posted a video on my site and complained to me that there is no Full Screen Button in the embedded video. The fix to this is really simple:

You need to go to Styles & Templates ?> Style Manager ?> ?> BBCode Layout Templates ?> bbcode_video:

Find:

HTML Code:

<vb:elseif condition="$provider == 'youtube'" />
<object class="restrain" type="application/x-shockwave-flash" width="640" height="385" data="http://www.youtube.com/v/{vb:raw code}">
        <param name="movie" value="http://www.youtube.com/v/{vb:raw code}" />
        <param name="wmode" value="transparent" />
        <!--[if IE 6]>
        <embed width="640" height="385" type="application/x-shockwave-flash" src="http://www.youtube.com/v/{vb:raw code}" />
        <![endif]-->
</object>

Replace with:

HTML Code:

<vb:elseif condition="$provider == 'youtube'" />
<object class="restrain" type="application/x-shockwave-flash" width="640" height="385" data="http://www.youtube.com/v/{vb:raw code}&fs=1">
    <param name="movie" value="http://www.youtube.com/v/{vb:raw code}&fs=1" />
    <param name="wmode" value="transparent" />
    <param name="allowFullScreen" value="true" />
    <!--[if IE 6]>
        <embed width="640" height="385" type="application/x-shockwave-flash" src="http://www.youtube.com/v/{vb:raw code}" />
    <![endif]-->
</object>

I also blogged about it here.

For Vimeo, the process is the same,

Find:

HTML Code:

<vb:elseif condition="$provider == 'vimeo'" />
<object class="restrain" type="application/x-shockwave-flash" width="640" height="360" data="http://vimeo.com/moogaloop.swf?clip_id={vb:raw code}">
        <param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id={vb:raw code}" />
        <param name="wmode" value="transparent" />
        <!--[if IE 6]>
        <embed width="640" height="360" type="application/x-shockwave-flash" src="http://vimeo.com/moogaloop.swf?clip_id={vb:raw code}" />
        <![endif]-->
</object>

Replace with:

HTML Code:

<vb:elseif condition="$provider == 'vimeo'" />
<object class="restrain" type="application/x-shockwave-flash" width="640" height="360" data="http://vimeo.com/moogaloop.swf?clip_id={vb:raw code}&amp;fullscreen=1">
        <param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id={vb:raw code}" />
        <param name="wmode" value="transparent" />
        <param name="allowfullscreen" value="true" />
        <!--[if IE 6]>
        <embed width="420" height="339" type="application/x-shockwave-flash" src="http://www.dailymotion.com/swf/{vb:raw code}" />
        <![endif]-->
</object>

Hope this helps...

arena 03-14-2010 10:11 PM

Thank you installed

Jabong82 03-14-2010 10:43 PM

Thank you very much. Great Mod Installed.

I have a question though. Is there a way to get this code to work so youtube videos can be displayed in an iphone?

I had a code which your mod replaced that allowed youtube videos to show in an iphone, however it was weird because it would show only some videos and some would be left with the little flash icon.

Any help would be appreciated. Thank you again for this mod though.

archet1337 03-14-2010 11:49 PM

This is awesome. Thanks for sharing.

Sadikb 03-15-2010 06:32 AM

Quote:

Originally Posted by arena (Post 2003703)
Thank you installed

Quote:

Originally Posted by archet1337 (Post 2003782)
This is awesome. Thanks for sharing.

Thanks guys for your appreciation. It's motivated me to share some of my other customizations too... :)

Sadikb 03-15-2010 06:37 AM

Quote:

Originally Posted by Jabong82 (Post 2003732)
Thank you very much. Great Mod Installed.

I have a question though. Is there a way to get this code to work so youtube videos can be displayed in an iphone?

I had a code which your mod replaced that allowed youtube videos to show in an iphone, however it was weird because it would show only some videos and some would be left with the little flash icon.

Any help would be appreciated. Thank you again for this mod though.

I am not sure if this will work, but I think the Iphone plays youtube videos if you have the embed tag in. So Try this:

Find:

Code:

<vb:elseif condition="$provider == 'youtube'" />
<object class="restrain" type="application/x-shockwave-flash" width="640" height="385" data="http://www.youtube.com/v/{vb:raw code}">
    <param name="movie" value="http://www.youtube.com/v/{vb:raw code}" />
    <param name="wmode" value="transparent" />
</object>

Replace with:

Code:

<vb:elseif condition="$provider == 'youtube'" />
<object class="restrain" type="application/x-shockwave-flash" width="640" height="385" data="http://www.youtube.com/v/{vb:raw code}&fs=1">
    <param name="movie" value="http://www.youtube.com/v/{vb:raw code}&fs=1" />
    <param name="wmode" value="transparent" />
    <param name="allowFullScreen" value="true" />
  <embed
    src="http://www.youtube.com/v/{vb:raw code}&fs=1"
    type="application/x-shockwave-flash"
    allowscriptaccess="always"
    allowfullscreen="true"
    width="640"
    height="385">
  </embed>
</object>

You can reduce the embed width if it causes a problem with iphone screen. Once again, I am not sure it will work, give it a try, (I don't have an iphone) if it doesn't, remove the <embed></embed> tags.

COL NIL SATIS 03-15-2010 06:15 PM

ive added that code mate but im still not getting the full screen option ???? do we also have to edit the bb code replacement??? any ideas

Sadikb 03-15-2010 07:12 PM

Quote:

Originally Posted by COL NIL SATIS (Post 2004217)
ive added that code mate but im still not getting the full screen option ???? do we also have to edit the bb code replacement??? any ideas

It should come... Could you share the url with the video?

Videx 03-16-2010 11:11 AM

This really shouldn't be classified as a mod of any type, it should be entered in the bug tracker.

But until it's fixed in the default code, thanks!

B?rger_von_Rado 03-16-2010 03:48 PM

THX! Worked for me and is installed, or better modified.:D


All times are GMT. The time now is 11: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.01267 seconds
  • Memory Usage 1,755KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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