I discovered Phoca Email recently, and had a problem with paths. Sometimes relatives path of pictures are not transformed to absolute path.
In your code I saw in phocaemailutils.php the function fixImagesPath () to transform paths.
I understand the problem:
Sometimes my email code is:
Code: Select all
<img src="images/logo.jpg" />
And other times:
Code: Select all
<img style="border: 0; height: auto; width: 100%" src="images/logo.jpg" />
Your code search for
Code: Select all
<img src="
There are 2 ways to correct it:
The simplest: I just change my html code ! ;-)
For example:
Code: Select all
<img src="images/logo.jpg" style="border: 0; height: auto; width: 100%" />
So I change your code from:
Code: Select all
return str_replace('<img src="', '<img src="'. JURI::root(), $text);
Code: Select all
return str_replace('src="', 'src="'. JURI::root(), $text);
And thanks for Phoco Email, it's a really cool and useful tool !