CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Tips & Solutions

 Solution to FCKEditor not storing full URL for inserted images

Print topic Send  topic

Author Message
jacem

Posts: 87
Posted: 08/13/2007, 12:43 AM

I have found a work around for a problem where FCKEditor doesn't store the complete image URL when inserting images into a FCKEditor enabled field. Usually this isn't an issue unless you are using the field as a HTML email message body.

I set up a FCKEditor field to allow uses to define the message they wanted to bulk email to a table of clients including the FCKEditor ability to upload and insert an image into the BLOB field. I later allowed the users to search and output the clients and as each record in the grid was displayed it generated an email message to the client.

The only problem was the FCKEditor didn't hold the entire path to the image stored in its publicly accessible directory: it was missing the domain name at the start.

So before the mail() function was called (in my case I am using PHP), it did a str_repalce of the $messagetext field (which was created using FCKEditor) to add on the extra domain bits needed for when the message arrived in someone’s Outlook InBox:

$messagetext=str_replace('src="/userfiles/','scr="http://www.mydomain.com.au/userfiles/',$messagetext);

This neatly added the right bit on the front of any image links within the message body so that the images display correctly when they arrive.

Hope it helps someone else out there!
(alas someone will no doubt point out a fckedit option for storing the complete image url so treat this as a sledge hammer way to overcome this).
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.