help! I am using fckeditor in a newsletter system so i MUST have absolut url's for both links and images. I have looked through this forum and on the wiki and cannot find anything that is working. Anyone know how to fix this? Thanks
Mon, 12/12/2005 - 19:13
#1

RE: absolute url's
RE: absolute url's
http://example.com/
RE: absolute url's
RE: absolute url's
This is what the email source looks like for the image location:
This is how it should be:
http://domain.com/emailer/system/data/u ... y_logo.gif
// Fixes FCKEditor image source bug function FixFCKEditorImageSourceBug($Content, $ArrayConfig) { preg_match_all("/src\=\"(.*)\/data\/user_uploads(.*)\"/iU", $Content, $ArrayMatches, PREG_SET_ORDER); foreach ($ArrayMatches as $EachMatch) { $TMPImageURL = $EachMatch[1].'/data/user_uploads'.$EachMatch[2]; $TMPCorrectImageURL = $ArrayConfig['URLs']['Software'].$TMPImageURL; $Content = str_replace('src="'.$TMPImageURL.'"', 'src="'.$TMPCorrectImageURL.'"', $Content); } preg_match_all("/src\=\"(.*)\/data\/editors\/fckeditor(.*)\"/iU", $Content, $ArrayMatches, PREG_SET_ORDER); foreach ($ArrayMatches as $EachMatch) { $TMPImageURL = $EachMatch[1].'/data/editors/fckeditor'.$EachMatch[2]; $TMPCorrectImageURL = $ArrayConfig['URLs']['Software'].$TMPImageURL; $Content = str_replace('src="'.$TMPImageURL.'"', 'src="'.$TMPCorrectImageURL.'"', $Content); } return $Content; }