CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Re: Embedding Images in Mailings
Pages: [1]

Author Topic: Re: Embedding Images in Mailings  (Read 7189 times)

Sarah

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 3
    • American Friends Service Committee - Southeastern New England
Re: Embedding Images in Mailings
August 18, 2008, 09:21:37 am
One of the biggest challenges we are having right now is the use of images in the mailings. I usually have to send out an email for our database users instead of having them take care of it themselves. I upload the image as content, then compose the html in an editor, and then upload that html. It's a little complicated for the casual database  user. Am I doing this correctly or is there a much easier way to embed images in a mailing?

civive

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 2
Re: Embedding Images in Mailings
August 19, 2008, 06:42:22 am
Are you using Drupal or joomla?

Sarah

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 3
    • American Friends Service Committee - Southeastern New England
Re: Embedding Images in Mailings
August 19, 2008, 08:02:19 am
we're running drupal 5.6

civive

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 2
Re: Embedding Images in Mailings
August 19, 2008, 08:57:14 am
What I did (using Drupal 5.6 and civicrm 2.0) was following this patch to replace the html editor with tinymce and imce module for file integration. http://issues.civicrm.org/jira/browse/CRM-3002
But you need absolute paths !!! so make sure you configure that right. I also installed a module for absolute paths in images http://drupal.org/project/abssrc

Sarah

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 3
    • American Friends Service Committee - Southeastern New England
Re: Embedding Images in Mailings
August 21, 2008, 09:24:57 am
that's great! thanks.

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: Embedding Images in Mailings
November 03, 2008, 07:05:47 am
I'm on CiviCRM 2.1 with D 6, and I'm trying to get IMCE integrated with CiviMail mailings. It's all working well on my Drupal side.

But in CiviMail I still don't get the image browse button. Any suggestions on how I can get imce to tap in here.....?

In drupal I am using WYSIWYG api w/ TinyMCE 3, IMCE.



Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Embedding Images in Mailings
November 03, 2008, 07:53:32 am

We've integrated directly to tinymce and not via imce.

You'll need to modify the tinymce config options (within the civicrm packages directory) to get the image browse button etc

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: Embedding Images in Mailings
November 07, 2008, 10:37:10 am
In my attempt to get this working, I decided it would probably be easier to integrate on the fckeditor side than tinymce. I realized I can use the built-in fck image uploader (or that's what it looks like) as i was having trouble trying to get it to work with imce (which I would prefer, but oh well).

So here's what I ended up doing:

Opened fckconfig.js from /sites/all/modules/civicrm/packages/fckeditor/ and made
Code: [Select]
FCKConfig.LinkBrowser = true;

FCKConfig.ImageBrowser = true ;

FCKConfig.ImageUpload = true ;
FCKConfig.LinkUpload = true ;

(they were set to false)


That got me the 'browse server' button when i click the image on a civicrm html mailing page. however, that started giving me an error about a connector being disabled, so i opened /sites/all/modules/civicrm/packages/fckeditor/editor/filemanager/connectors/php/config.php (directed there by the error i was getting)

and changed
Code: [Select]
$Config['Enabled'] = false ;

to
Code: [Select]
$Config['Enabled'] = true ;
I am slightly concerned I was supposed to do something else here as in the comments it says:
"WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
authenticated users can access this file or use some kind of session checking."

However, I wasn't really sure what I should do to remedy it, so I guess I'll just keep my fingers crossed.

Then I had to do a few more things I figured out by trial and error. First, I found out it wants to create an 'image' folder inside whatever folder path you are going to give it. For me, I wanted it to put these inside the drupal files folder. So in /sites/default/files/ I created a folder called 'image' and gave it proper permissions so apache could write to it.

Then, you need to set the $Config['UserFilesPath'] to be the full http path this folder. The reason it needs to be full http path is because the point here is for these images to go out in email, and if you do a relative path like it asks for then your images will break. So I set:

Code: [Select]
$Config['UserFilesPath'] = 'http://mysite.org/sites/default/files/' ;
Note that you don't include the 'image' directory there -- it adds that automatically.

Next, you also need to set the $Config['UserFilesAbsolutePath'] variable. You need to put the non http absolute path on this one or it will generate other errors, meaning the absolute path on your server. So in my case it was:

Code: [Select]
$Config['UserFilesAbsolutePath'] = '/var/htdocs/sites/default/files/'
And then it is all working, and the pics are coming through in emails successfully.
« Last Edit: November 07, 2008, 10:44:47 am by emilyf »

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: Embedding Images in Mailings
November 10, 2008, 12:07:59 pm
One more question: Does anyone know how to increase the height of the textarea box (fckeditor) for the html mailings? I cannot figure this out....

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Embedding Images in Mailings
November 10, 2008, 02:28:29 pm
Emily:

You will have to modify packages/HTML/QuickForm/fckeditor.php. Search for "$Height", approx. line 31, i also think you might have to modify css, but not sure.

HTH

Kurund
Found this reply helpful? Support CiviCRM

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: Embedding Images in Mailings
November 10, 2008, 04:01:38 pm
Kurund: exactly what i was looking for. Thank you.

alfred_nutile

  • Ask me questions
  • ****
  • Posts: 464
  • Karma: 14
    • River Valley Tech Collective
Re: Embedding Images in Mailings
November 11, 2008, 04:00:55 am
Yes thanks that worked great on the resize.
The image upload would work too but it is a shared install of civicrm.
I wonder if there is a shared way to do this in drupal.
Like make a folder path that matches and then copy just this fck folder into that path and edit it there.

petbos157

  • I’m new here
  • *
  • Posts: 26
  • Karma: 2
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7
  • MySQL version: 5.1.71
  • PHP version: 5.3.3
Re: Embedding Images in Mailings
June 26, 2009, 05:48:40 am
I've done all of it, but it doesn't change anything for me in the FCKeditor.
FCKConfig.LinkBrowser = true;
FCKConfig.ImageBrowser = true ;
FCKConfig.ImageUpload = true ;
FCKConfig.LinkUpload = true ;
and
$Config['Enabled'] = true ;
$Config['UserFilesPath'] = 'http://mysite.org/sites/default/files/' ;
$Config['UserFilesAbsolutePath'] = '/var/htdocs/sites/default/files/'

How can i see what is wrong, is there any log- or debuginformation ? Where can i find it ?
Any suggestions ?
What is the value of 'FCKConfig.BasePath'

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: Embedding Images in Mailings
June 26, 2009, 07:31:42 am
did you create a folder called 'image' inside sites/default/files and give apache permission to write to it?

kurosevic

  • I’m new here
  • *
  • Posts: 25
  • Karma: 1
Re: Embedding Images in Mailings
September 29, 2010, 07:04:59 pm
Quote from: Donald Lobo on November 03, 2008, 07:53:32 am
We've integrated directly to tinymce and not via imce.

You'll need to modify the tinymce config options (within the civicrm packages directory) to get the image browse button etc
- lobo

Hey there Lobo, what modifications did you make to the config options? I'd like to take the same route.

Thanks,
Kristian

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Re: Embedding Images in Mailings

This forum was archived on 2017-11-26.