Today i came across a problem with FCKEditor. When i upload an image from fckeditor Browser Server option, it uploads correctly and insert image in content as well. But if i will send this content in email (for newsletter) than image will not be there as fckeditor inserts relative path in source of image. There should be a complete URL for image if you are sending this content into email. I was trying to find the way that how to insert the full url path when image uploads from FCKEditor.
I was in urgency so i found the alternative solution to make this problem fixed(solved) right away. What i have done is , find the relative path and replace it with full URL path. Look at below line which replace the absolute path inplace of relative path in image source tag.
$msg = str_replace('src="/userfiles/','src="http://www.example.com/userfiles/',$msg);
I am PHP Freelancer, Rakshit Patel AKA WordPress Freelancer working as PHP Programmer India. I am here to share all my developing knowledge, quick coding techniques, quick solutions to save your time and help you guys for any issue or bug fixing. If you have any PHP, WordPress, Magento related work, please contact me. I am interested for the work.