1
0
mirror of https://github.com/e107inc/e107.git synced 2025-09-01 18:32:44 +02:00

Media-Manager Youtube video default prefs added.

This commit is contained in:
Cameron
2014-03-12 14:09:48 -07:00
parent f9d018ae5d
commit a2235cfd39
2 changed files with 36 additions and 11 deletions

View File

@@ -2846,10 +2846,24 @@ class e_parser
$thumb = vartrue($parm['thumb']);
$pref = e107::getPref();
$ytpref = array();
foreach($pref as $k=>$v) // Find all Youtube Prefs.
{
if(substr($k,0,8) == 'youtube_')
{
$key = substr($k,8);
$ytpref[$key] = $v;
}
}
$ytqry = http_build_query($ytpref);
if($type == 'youtube')
{
$video = '<iframe width="560" height="315" src="//www.youtube.com/embed/'.$id.'" style="border:0px" allowfullscreen></iframe>';
$video = '<iframe width="560" height="315" src="//www.youtube.com/embed/'.$id.'?'.$ytqry.'" style="border:0px" allowfullscreen></iframe>';
$thumbSrc = "https://i1.ytimg.com/vi/".$id."/0.jpg";
if($thumb == 'tag')