Osclass forums

Support forums => Tips, tricks, and tutorials => Topic started by: Media DMJ on June 04, 2014, 12:50:50 pm

Title: [How to] Youtube video Responsive
Post by: Media DMJ on June 04, 2014, 12:50:50 pm
Easy way to Responsive youtube video using Youtube plugin.

Edit > plugins > youtube > item_detail.php

Replace
Code: [Select]
<?php if( isset($detail['s_youtube']) && !empty($detail['s_youtube']) ) { ?>
<div>
    <object width="425" height="344">
        <param name="movie" value="<?php echo trim($detail['s_youtube']) ; ?>"></param>
        <param name="allowFullScreen" value="true"></param>
        <param name="wmode" value="transparent"></param>
        <param name="allowScriptAccess" value="always"></param>
        <embed src="<?php echo $detail['s_youtube'] ; ?>"
          type="application/x-shockwave-flash"
          allowfullscreen="true"
          allowscriptaccess="always"
          wmode="transparent"
          width="425" height="344">
        </embed>
    </object>
</div>
<?php ?>

To
Code: [Select]
<?php if( isset($detail['s_youtube']) && !empty($detail['s_youtube']) ) { ?>
<style>
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    padding-top: 30px; height: 0; overflow: hidden;
}
 
.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
</style>
<div class="video-container">
    <object width="425" height="344">
        <param name="movie" value="<?php echo trim($detail['s_youtube']) ; ?>"></param>
        <param name="allowFullScreen" value="true"></param>
        <param name="wmode" value="transparent"></param>
        <param name="allowScriptAccess" value="always"></param>
        <embed src="<?php echo $detail['s_youtube'] ; ?>"
          type="application/x-shockwave-flash"
          allowfullscreen="true"
          allowscriptaccess="always"
          wmode="transparent"
          width="425" height="344">
        </embed>
    </object>
</div>
<?php ?>

Enjoy  8)
Title: Re: [How to] Youtube video Responsive
Post by: victorelectronics on February 06, 2015, 12:54:48 pm
Thanks !
works perfectly.
Title: Re: [How to] Youtube video Responsive
Post by: SmaRTeY on February 06, 2015, 04:49:40 pm
Thanks Media DMJ!
Title: Re: [How to] Youtube video Responsive
Post by: mrtsoftware on January 03, 2018, 08:25:30 pm
Yes it works, video is responsive,
but when user try to publish ads, no option for " add video " ....Only into admin dasboard area this function viewable...

How to correct it? How users can also submit video inside their listings?