diff --git a/e107_admin/image.php b/e107_admin/image.php index 90834b412..0ddf4376f 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -729,7 +729,8 @@ class media_admin_ui extends e_admin_ui 'youtube_showinfo' => array('title'=> "Show Video Info", 'tab'=>2, 'type' => 'boolean', 'data'=>'int', 'help'=>''), 'youtube_cc_load_policy' => array('title'=> "Show Closed-Captions by default", 'tab'=>2, 'type' => 'boolean', 'data'=>'int', 'help'=>''), 'youtube_modestbranding' => array('title'=> "Use Modest Branding", 'tab'=>2, 'type' => 'boolean', 'data'=>'int', 'help'=>''), - + 'youtube_bbcode_responsive' => array('title'=> "Make the YouTube bbcode responsive", 'tab'=>2, 'type' => 'boolean', 'data'=>'int', 'help'=>''), + // ); diff --git a/e107_core/bbcodes/bb_youtube.php b/e107_core/bbcodes/bb_youtube.php index 64909e8ff..0395b5987 100644 --- a/e107_core/bbcodes/bb_youtube.php +++ b/e107_core/bbcodes/bb_youtube.php @@ -333,17 +333,27 @@ class bb_youtube extends e_bb_base $class = "bbcode ".e107::getBB()->getClass('youtube'); // consistent classes across all themes. $ret = "\n"; // <-- DO NOT MODIFY - used for detection by bbcode handler. - $ret .= ' - - - - - '; - - // Not XHTML - but needed for compatibility. - $ret .= ''; - $ret .= ''; + + if(e107::getConfig()->get('youtube_bbcode_responsive') == 1) // Responsive Mode. + { + $ret .= e107::getParser()->toVideo($yID.".youtube"); + } + else // Legacy Mode. + { + $ret .= ' + + + + + '; + + // Not XHTML - but needed for compatibility. + $ret .= ''; + + $ret .= ''; + } + $ret .= ""; // <-- DO NOT MODIFY.