mirror of
https://github.com/e107inc/e107.git
synced 2025-08-18 04:12:00 +02:00
Added support for embedded mail media in mailouts.
This commit is contained in:
@@ -2949,6 +2949,21 @@ class e_parser
|
||||
return "<img class='img-responsive' src='".$thumbSrc."' alt='Youtube Video' style='width:".vartrue($parm['w'],'80')."px'/>";
|
||||
}
|
||||
|
||||
if($thumb == 'email')
|
||||
{
|
||||
$thumbSrc = "http://i1.ytimg.com/vi/".$id."/maxresdefault.jpg"; // 640 x 480
|
||||
$filename = 'temp/yt-thumb-'.md5($id).".jpg";
|
||||
$filepath = e_MEDIA.$filename;
|
||||
$url = 'http://youtu.be/'.$id;
|
||||
|
||||
if(!file_exists($filepath))
|
||||
{
|
||||
e107::getFile()->getRemoteFile($thumbSrc, $filename,'media');
|
||||
}
|
||||
|
||||
return "<a href='".$url."'><img class='video-responsive video-thumbnail' src='".$filepath."' alt='Youtube Video' title='Click to view on Youtube' /></a>";
|
||||
}
|
||||
|
||||
if($thumb == 'src')
|
||||
{
|
||||
return $thumbSrc;
|
||||
|
Reference in New Issue
Block a user