mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 14:46:56 +02:00
Admin->mailout embedded video thumbnail styling.
This commit is contained in:
@@ -173,6 +173,7 @@ $EMAIL_TEMPLATE['default']['header'] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHT
|
||||
body { padding:10px; background-color: #E1E1E1 }
|
||||
div#body { padding:10px; width: 800px; background-color: #FFFFFF; border-radius: 5px; font-family: helvetica,arial }
|
||||
.video-thumbnail { max-width: 100% }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
@@ -2961,7 +2961,8 @@ class e_parser
|
||||
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>";
|
||||
return "<a href='".$url."'><img class='video-responsive video-thumbnail' src='".$filepath."' alt='Youtube Video' title='Click to view on Youtube' />
|
||||
<div class='video-thumbnail-caption'><small>Click to watch video</small></div></a>";
|
||||
}
|
||||
|
||||
if($thumb == 'src')
|
||||
|
@@ -638,11 +638,11 @@ class e107Email extends PHPMailer
|
||||
|
||||
if($tp->isVideo($val['path']))
|
||||
{
|
||||
$eml['shortcodes'][$id] = "<div class='media'>".$tp->toVideo($val['path'],array('thumb'=>'email'))."</div>";
|
||||
$eml['shortcodes'][$id] = "<div class='media media-video'>".$tp->toVideo($val['path'],array('thumb'=>'email'))."</div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$eml['shortcodes'][$id] = "<div class='media'><img class='img-responsive' src='".$tp->replaceConstants($val['path'])."' alt='' /></div>";
|
||||
$eml['shortcodes'][$id] = "<div class='media media-image'><img class='img-responsive' src='".$tp->replaceConstants($val['path'])."' alt='' /></div>";
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -848,31 +848,40 @@ class e107MailManager
|
||||
$temp = intval($email['mail_recipient_id']).'/'.intval($email['mail_source_id']).'/'.intval($email['mail_target_id']).'/';
|
||||
$result['e107_header'] = $temp.md5($temp); // Set up an ID
|
||||
}
|
||||
|
||||
if (isset($email['mail_attach']) && (trim($email['mail_attach']) || is_array($email['mail_attach'])))
|
||||
{
|
||||
$downDir = realpath(e_ROOT.$this->e107->getFolder('downloads'));
|
||||
$tp = e107::getParser();
|
||||
|
||||
if (is_array($email['mail_attach']))
|
||||
{
|
||||
foreach ($email['mail_attach'] as $k => $v)
|
||||
{
|
||||
$result['email_attach'][$k] = $downDir.$v;
|
||||
$result['email_attach'][$k] = $tp->replaceConstants($v);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result['email_attach'] = $downDir.trim($email['mail_attach']);
|
||||
$result['email_attach'] = $tp->replaceConstants(trim($email['mail_attach']));
|
||||
}
|
||||
}
|
||||
if (isset($email['mail_overrides']) && is_array($email['mail_overrides'])) $result = array_merge($result, $email['mail_overrides']);
|
||||
|
||||
e107::getAdminLog()->addDebug(print_a($email,true),true);
|
||||
if (isset($email['mail_overrides']) && is_array($email['mail_overrides']))
|
||||
{
|
||||
$result = array_merge($result, $email['mail_overrides']);
|
||||
}
|
||||
|
||||
print_a($email);
|
||||
$title = "<h4>".__METHOD__." Line: ".__LINE__."</h4>";
|
||||
e107::getAdminLog()->addDebug($title.print_a($email,true),true);
|
||||
|
||||
// $result['template'] = $email['mail_send_style'];
|
||||
|
||||
echo "<h4>".__METHOD__." Line: ".__LINE__."</h4>";
|
||||
print_a($result);
|
||||
if(!empty($email['mail_media']))
|
||||
{
|
||||
$result['media'] = $email['mail_media'];
|
||||
}
|
||||
|
||||
$title2 = "<h4>".__METHOD__." Line: ".__LINE__."</h4>";
|
||||
e107::getAdminLog()->addDebug($title2.print_a($result,true),true);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user