1
0
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:
Cameron
2014-10-18 15:00:40 -07:00
parent 5a2ce38e08
commit 65b44a8abb
7 changed files with 100 additions and 23 deletions

View File

@@ -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;