Hello,
i 'm developing a mailing list manager in php and i'm trying to use FCKeditor as the interface to create the html emails.
I absolutely need that when the user adds an image, the absolute link (http://www.domain.com/images/img.gif) be inserted in the img tag 's src value. Yet, as now, it puts the relative path.
Does anybody know where to look at to enable it ?
Also, FCKeditor generates by default the following html code:
<html> <head> <title></title> <link type="text/css" rel="stylesheet" href="/metalab2/_admin/_FCKeditor/editor/css/fck_editorarea.css" /> </head> <body> </body> </html>
well, for html emails, it's really better to avoid this code (the html and body tags)
Again, do you know by chance how to get rid of it ?
Thanks a lot to FCK for an (other than that) incredible RTE editor !
RE: absolute links
RE: absolute links
In PHP, change the first function in editor.filemanager/browser/default/connectors/php/io.php as follows:
function GetUrlFromPath( $resourceType, $folderPath )
{
/*if ( $resourceType == '' )
return RemoveFromEnd( $GLOBALS["UserFilesPath"], '/' ) . $folderPath ;
else
return $GLOBALS["UserFilesPath"] . $resourceType . $folderPath ;*/
// changed for absolute links
return strtolower( strtok( $_SERVER['SERVER_PROTOCOL'], '/' ) ) . '://'. $_SERVER['HTTP_HOST'] . $GLOBALS["UserFilesPath"]. $resourceType . $folderPath;
}
voidstate