[mod] Embedding images in Content section

3rd party code for phpList

Re: [mod] Embedding images in Content section

Postby SurvivalAcres » 10:12pm, Wed 26 Aug, 2009

Thanks dragon, I downloaded, unzipped, installed. Still no go. Images do not show up in emails, just a little gray box.

Earlier in the thread, someone said that all these fixes do not work in version 2.10.10., so I'm a bit at a loss as to what to do next.
SurvivalAcres
phpList newbie
 
Posts: 3
Joined: 9:11pm, Mon 24 Aug, 2009

Re: [mod] Embedding images in Content section

Postby masdeeper » 2:50pm, Mon 26 Oct, 2009

I made the chage as suggested by RJC ( I double checked) and it does not seem to work.
The change don't seem to apply after editing class.phplistmailer.php

To make a quick test I renamed "class.phplistmailer.php" to "class.phplistmailer.php.test" and PhpList still works...

Anyone have a clue??

I'm using CentOS with php5

Thank you
masdeeper
phpLister
 
Posts: 12
Joined: 10:00am, Tue 29 Sep, 2009

Re: [mod] Embedding images in Content section

Postby spelldevco » 5:38pm, Wed 28 Oct, 2009

I have 2.10.4 and I embedded images using a template but they don't show up in the email. I don't understand how do I access admin/class.php etc. to change and edit the code as mentioned on this thread? Do I have to be an admin for that to happen? I'm relatively new to all this.
spelldevco
phpList newbie
 
Posts: 1
Joined: 2:03pm, Wed 28 Oct, 2009

Re: [mod] Embedding images in Content section

Postby masdeeper » 1:52pm, Mon 02 Nov, 2009

spelldevco : to edit class.php you need to have ftp access, ssh or something similar to be able to edit the files.
If somebody is hosting PhpList for you, you should ask the admin to edit it for you or to give you the write access to the required files.
masdeeper
phpLister
 
Posts: 12
Joined: 10:00am, Tue 29 Sep, 2009

Re: [mod] Embedding images in Content section

Postby FadeFx » 7:45pm, Tue 17 Nov, 2009

hi all,

i had this already working last month, but this time i wanted to build a new message it was not possible to upload images anymore, i fixed this again with newest version of fck editor and some php hacking to find out all the quirks, but now also the images do not get attached despite i use the modified class.phplistmailer.php file for 2.10.10 and have
Code: Select all
define ("EMBEDUPLOADIMAGES",1);
defined in config.php. hope someone can help...
FadeFx
phpLister
 
Posts: 9
Joined: 8:40pm, Thu 12 Nov, 2009

Re: [mod] Embedding images in Content section

Postby FadeFx » 8:20pm, Tue 17 Nov, 2009

found the bug, the filesystem images get always a url instead of a path, so the string has to be cut:

replace in class.phplistmailer.php
Code: Select all
if (EMBEDUPLOADIMAGES) {
          if($this->filesystem_image_exists($images[1][$i])){
              $filesystem_images[] = $images[1][$i];
              $this->Body = str_replace($images[1][$i], basename($images[1][$i]), $this->Body);

with
Code: Select all
if (EMBEDUPLOADIMAGES) {
          $imagePath = preg_replace('/http:\/\/.*?\//', '/', $images[1][$i]);
          if($this->filesystem_image_exists($imagePath)){
              $filesystem_images[] = $imagePath;
              $this->Body = str_replace($images[1][$i], basename($images[1][$i]), $this->Body);


this did the trick for me.
FadeFx
phpLister
 
Posts: 9
Joined: 8:40pm, Thu 12 Nov, 2009

Re: [mod] Embedding images in Content section

Postby kobo » 2:19am, Sat 19 Dec, 2009

I have a bit of a different issue, and hope it is easily fixed. I am using tinyMCE editor with the tinyBrowser plugin to manage the images in my messages. All this is "linked" to a Drupal install and hence the image directories are in ./sites/default/files which has multiple sub directories. This allows me to use images already on the site as well as uploading new ones and it works great except the fact that it won't embed them - it just links them. I have set tinyMCE to convert all image links to absolute and am wondering what and if the hack is possible? Well, I know it is possible I just don't know how I should tackle this.

Has anyone been able to embed absolute linked images?

FYI: I am using tinyMCE as it has the template plugin allowing me to insert templates and snippets of html code to build the newsletter. So I can't change this.
kobo
phpList newbie
 
Posts: 1
Joined: 2:01am, Sat 19 Dec, 2009

Re: [mod] Embedding images in Content section

Postby afatac » 8:57am, Sat 19 Jun, 2010

I notice that in the change log of version 2.10.11, this issue of embedding image in Content section is marked resolve http://mantis.phplist.com/changelog_page.php

Has anyone tried it in 2.10.11 or 2.10.12?
afatac
phpLister
 
Posts: 7
Joined: 10:49am, Sat 09 May, 2009

Re: [mod] Embedding images in Content section

Postby thomi » 3:32pm, Tue 21 Sep, 2010

hello all

in 2.10.12 i have just done this steps

1. Enable file upload in FCKEditor

file: admin/FCKeditor/editor/filemanager/connectors/phplist/config.php
line 28 and 29, set 6 "../" instead of 8
Code: Select all
} elseif (is_file('../../../../../../config/config.php')) {
  include "../../../../../../config/config.php";


file: config/config.php
line 505
Code: Select all
define("FCKIMAGES_DIR","uploadimages");

- create the folder called "uploadimages" in PHPList root folder.
- chmod 755 this folder, maybe with FileZilla
- Login into PHPList Admin, create a new Message, opened the Image Editor and insert an image with the "Browse Server" function.

With this way FCKEditor will create the folder "image" inside the folder "uploadimages" that was created manually.


2. Enable embedded images

file: config/config.php
line 691, at the end of the file (before ?>) add this:
Code: Select all
define ("EMBEDUPLOADIMAGES",1);


Sending messages with embedded images works fine, until the image is in the folder "uploadimages/image" and the image names haven't spaces in it's file name.

Tried that with embedding an image like "test image.jpg".
The source code of the PHPList Message show's it as: src="/uploadimages/image/test%20image.jpg"
The source code of the eMail you will receive is the same and the image isn't attached to the eMail.

But i can live with that, cause normally i don't use images with spaces in web content.

Hope this helps some users of v2.10.12

have a nice time
kind regards from switzerland
thomi
thomi
PL Nut
 
Posts: 23
Joined: 3:02pm, Tue 21 Sep, 2010

Re: [mod] Embedding images in Content section

Postby aclhkaclhk » 4:46am, Fri 05 Nov, 2010

i am using 2.10.12

i followed all your instruction but the "browse server" button does not exist in "image properties"

drwxrwxrwx 2 web4 client2 4096 2010-11-05 12:40 uploadimages

pls advise.
aclhkaclhk
PL Nut
 
Posts: 17
Joined: 12:16pm, Mon 09 Aug, 2010

Re: [mod] Embedding images in Content section

Postby thomi » 2:52pm, Fri 05 Nov, 2010

Hi

try to chmod your uploadimages folder to 755 and not to 777.
chmod 755 should give you this output:
drwxr-xr-x 2 web4 client2 4096 2010-11-05 12:40 uploadimages

also recheck this
file: admin/FCKeditor/editor/filemanager/connectors/phplist/config.php
line 28 and 29, set 6 "../" instead of 8


kind regards
thomi
thomi
PL Nut
 
Posts: 23
Joined: 3:02pm, Tue 21 Sep, 2010

Re: [mod] Embedding images in Content section

Postby aclhkaclhk » 4:12am, Sat 06 Nov, 2010

i followed your instruction exactly but without luck.

the tabs available in image properties are only "info", "link" and "advanced"

according to config.php (fckeditor), it should allow more:
$Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ;

do you use the FCKeditor (2.6.3) that bundled with 2.10.12? do i need to upgrade it?
aclhkaclhk
PL Nut
 
Posts: 17
Joined: 12:16pm, Mon 09 Aug, 2010

Re: [mod] Embedding images in Content section

Postby thomi » 10:13pm, Tue 09 Nov, 2010

hello

i use the build in FCKEditor...

Don't really know, why it won't work in your installation.
I'm wondering, why is there no real bugfix for that or a newer version that would fix that.

Hope more people see this thread...

thomi
thomi
PL Nut
 
Posts: 23
Joined: 3:02pm, Tue 21 Sep, 2010

Re: [mod] Embedding images in Content section

Postby arparolin » 11:53am, Sat 04 Dec, 2010

Did the following procedure:
- I've attached a picture
- I inserted an image in the text. In the URL field, I typed cid: name_of_attached_image.jpg

In the body of the email shows nothing, but after mailing Outlook can read normally, but not Gmail.
Can anyone help me?
arparolin
phpList newbie
 
Posts: 1
Joined: 11:39am, Sat 04 Dec, 2010

Re: [mod] Embedding images in Content section

Postby Subhash » 6:25pm, Wed 05 Jan, 2011

@ thomi:

Many thanks for your work. It works perfectly with PHPlist 2.10.12 and PHP 4.3.9.
Subhash
phpLister
 
Posts: 5
Joined: 5:55pm, Wed 05 Jan, 2011

PreviousNext

Return to Contributions: Plug-ins, Add-ons, Mods

Who is online

Users browsing this forum: No registered users and 3 guests