User Email Body taking out images

  • mikej
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
12 years 11 months ago #9227 by mikej
User Email Body taking out images was created by mikej
Hello,

I am trying to add an image into the email my customers will receive once they make a purchase. I am in eventbooking/configuration/messages and under "User Email Body". I add an image, save it and it doesn't save in the message. I am using JCE. I checked the settings for that editor and there isn't anything set to remove the image. Any ideas?

Please Log in or Create an account to join the conversation.

  • mikej
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
12 years 11 months ago #9228 by mikej
Replied by mikej on topic Re: User Email Body taking out images
It also appears to be stripping all html code out as well. Like I said, there isn't anything in the JCE editor which is causing this (that I can see)

Please Log in or Create an account to join the conversation.

  • mikej
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
12 years 11 months ago #9229 by mikej
Replied by mikej on topic Re: User Email Body taking out images
I have checked this with multiple editors and it is still doing the same thing. I would appreciate help on this ASAP as I was told I could use the message to send an image in (Ticket image) for my customers to print out and bring with them.

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #9233 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: User Email Body taking out images
Hi

That's something special with your server, so I had to modify the code alitle (I did the modification on your site already). Here is what I modified :

- Open the file administrator/components/com_eventbooking/controller.php, looks at the code at line 146 :
Code:
$data = JRequest::get('post', JREQUEST_ALLOWHTML) ;

=> I had to change it to :
Code:
$data = JRequest::get('post', JREQUEST_ALLOWHTML) ;

And It works !

Please Log in or Create an account to join the conversation.

  • mikej
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
12 years 11 months ago #9234 by mikej
Replied by mikej on topic Re: User Email Body taking out images
Thank you! I will test it out now! You are the man Tuan! The freaking man!!!

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #9236 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: User Email Body taking out images
Please note that now you will be able to insert images into the message. However, the images will not be visible in the emails because Joomla will remove the url of the images immediately after saving the message (it only stores the relative path of the images by default) .

To change this behavior, you will need to change the setting of your HTML editors. Go to Extensions -> Plugins manage, find the editor you are using (Editor - TinyMCE is the default one used by Joomla), click on it to change the setting. in the URLs parameter, set it to absolute (It is relative by default) - Look at the attached image for more detail !


The downsite of this setting is that it store URL of the current site into database. So if you change domain of your site (rarely happens), the new site won't work becase the link is incorrect. So my suggestion is :

- Change the setting as I said above (change URLs to absolute).

- Go to Configuration, change the messages, insert the images !

- Change the setting back to original (change URLs to relative) .

Hope this help !

Regards,

Tuan
Attachments:

Please Log in or Create an account to join the conversation.

  • mikej
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
12 years 11 months ago #9241 by mikej
Replied by mikej on topic Re: User Email Body taking out images
Thanks! Works perfectly!

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc