By Fidel Carrera on Tuesday, 25 July 2017
Posted in General Issues
Likes 0
Views 1K
Votes 0
Hi,

A few days back, Alex helped me fix some odd formatting with EB emails where it would scatter images from a blog with ransom white space before showing text.

The issue now is that the text is fine but there aren't any images being added at the start of the email. If possible, I would like for the post cover to show as the first image in the email followed by the preview text.

Thanks for your help.
Hey Fidel,

Currently that was not possible to show post cover into the email content, but if you enabled this setting `Position of Images After Truncation` to Top and `Total Images To Display` to 1, it will try to display 1 of the blog content image at the top of the email content, you can refer on my attached screenshot below.
·
Tuesday, 25 July 2017 12:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

Just following up to let you know that I made the changes to my settings but the emails will not show the cover image . Any idea if I can try a different approach?

Thanks
·
Friday, 25 August 2017 07:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Fidel,

Actually i did explained by default it will not show the post cover in email in my previous reply.

If you would like to show post cover in Email, you have to modify this post library, you can refer on my attached screenshot below.

JoomlaFolder/administrator/components/com_easyblog/includes/post/post.php


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

$image = '<img src="' . $image . '" style="max-width:100%"/><p>';
$blogIntro = $image . $blogIntro;
}
// end customisation


By the way, perhaps you can request this feature into our forum here https://stackideas.com/forums/easyblog/feature-requests so we will see if there a lot of user request this , we will definitely consider implement this in the future.
·
Friday, 25 August 2017 13:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Apologies, I will add that code this weekend and see how it goes.

Thanks for the quick reply.
·
Friday, 25 August 2017 15:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Alright Fidel
·
Friday, 25 August 2017 16:00
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post