1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-29 17:19:56 +02:00

New resizeImage() method added to MediaManager class. Inline images now resized on-the-fly prior to emailing. Sitebutton auto-resized prior to emailing.

This commit is contained in:
Cameron
2015-05-13 13:34:52 -07:00
parent 2f78304ab2
commit fba9816acd
4 changed files with 101 additions and 18 deletions

View File

@@ -991,7 +991,7 @@ class e107Email extends PHPMailer
if(!empty($eml['SMTPDebug']))
{
e107::getMessage()->addError($mail->ErrorInfo);
e107::getMessage()->addError($this->ErrorInfo);
}
}
@@ -1060,15 +1060,17 @@ class e107Email extends PHPMailer
foreach($images[3] as $i => $url)
{
// do not change urls for absolute images (thanks to corvuscorax)
if (!preg_match('#^[A-z]+://#',$url))
{
$url = $tp->replaceConstants($url);
// resize on the fly.
if($resized = e107::getMedia()->resizeImage($url, e_TEMP.basename($url),'w=800'))
{
$url = $resized;
}
$delim = $images[2][$i]; // Will be single or double quote
$filename = basename($url);
$directory = dirname($url);