I'm using the popfetcher-plugin (v1.30) with the newest s9y.
I've read several threads handling problems with the popfetcher but none could help.
I'm sending an email and using cronjob.de the email is parsed in that way correctly as the subject, category and text is shown correctly, only my attachements (image only) is just inserted into the media but not into the entry.
I tried several setting, starting from "Use plaintext attachments as entry body?", "First text attachment is entry body, the rest extended" being dis- and enabled, using plain-text, removing and not removing advertisement, still no solution for the image-problem. I also tried to send different image-types like JG, PNG or GIF.
GDLib is installed.
Popfetcher doesn't handle image in entry
Re: Popfetcher doesn't handle image in entry
And with a little work-around, images within an entry having a delimiter also works.
Just change
to
in serendipity_event_popfetcher.php on line 1078.
$postbody is an array, having the text in [0]. So I decided to remove everything after the delimiter here and adding the image afterwards.
Still have to prove how it works when sending more than one image, but I didn't tested it in the origin as well. So just a little dirty work-around.
Just change
Code: Select all
$msgbody = implode("<br />\n", $postbody);Code: Select all
$msgbody = $postbody[0];
$this->stripText($msgbody);
$msgbody .= $postbody[1];$postbody is an array, having the text in [0]. So I decided to remove everything after the delimiter here and adding the image afterwards.
Still have to prove how it works when sending more than one image, but I didn't tested it in the origin as well. So just a little dirty work-around.
Re: Popfetcher doesn't handle image in entry
Now sending emails with more than one image couldn't be handled with the above code.
Instead get the size of the array $postbody and iterate through it. Use this code:
Instead get the size of the array $postbody and iterate through it. Use this code:
Code: Select all
$msgbody .= $postbody[0];
$this->stripText($msgbody);
for ($j=1; $j<sizeof($postbody); $j++)
$msgbody .= $postbody[$j];