By Zeosing on Wednesday, 25 July 2018
Posted in Technical Issues
Likes 0
Views 758
Votes 0
Hi, with the hack doing by one of our colleges we try to insert post cover in emails template but for some reason it doesn´t appear

The hack code is :


// custom hack for display post cover in email
$this->normalizeBlogImage();
$mm = EB::mediamanager();

$url = $mm->getUrl($this->image);
$path = $mm->getPath($this->image);

$exists = JFile::exists($path);

if ($exists) {

$uri = JURI::getInstance();
$scheme = $uri->toString(array('scheme'));
$scheme = str_replace('://', ':', $scheme);

$image = $scheme . $url;


$blogImage = $image;
}
// end customisation


And in the post.new.php overrides has :

<div align="center" class="img-container center autowidth fullwidth " style="padding-right: 0px; padding-left: 0px;">
<!--[if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr style="line-height:0px;line-height:0px;"><td style="padding-right: 0px; padding-left: 0px;" align="center"><![endif]-->
<?php if ($templatePreview) { ?>
<img class="center autowidth fullwidth" align="center" border="0" src="https://site.com/images/placeholder.gif" alt="Image" title="Image" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block !important;border: 0;height: auto;float: none;width: 100%;max-width: 498px" width="498">
<?php } else { ?>
<img class="center autowidth fullwidth" align="center" border="0" src="<?php echo $blogImage;?>" alt="Image" title="Image" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block !important;border: 0;height: auto;float: none;width: 100%;max-width: 498px" width="498">

<?php } ?>
<!--[if mso]></td></tr></table><![endif]-->
</div>


Can you give a hand ?

Thanks.
I think only missing this $blogImage variable into that data array, you can check my attached screenshot below.
·
Wednesday, 25 July 2018 18:07
·
0 Likes
·
0 Votes
·
0 Comments
·
If you mean that is one of our colleague help you with this customisation in previously, perhaps you can provide us these 2 customisation file so we can able to check further regarding this.

And what is your current Easyblog version on your site?
·
Wednesday, 25 July 2018 17:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes of course, the files are attached now, and we have latest version.
·
Wednesday, 25 July 2018 17:45
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes you´re right, thanks Arlex
·
Wednesday, 25 July 2018 18:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for updating, glad that your issue is resolved now.

Just for your information, I have locked and marked this thread as resolved to avoid confusions in the future. Please start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiries.

Thanks for understanding
·
Wednesday, 25 July 2018 20:47
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post