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
Here's a hack of a solution based on http://sourceforge.net/forum/message.php?msg_id=3257937
ideally, at least if you install more than one installation of say a newsletter software like ours, you have a config file that gets editor on install with the SITE_ROOT_URL or whatever,
ie:
require_once dirname(__FILE__).'/../../../../../../../../manage/config.php';
which defines SITE_ROOT_URL to something like http://example.com/
and then modified the CurrentFolder line to this:
echo '<CurrentFolder path="' . ConvertToXmlAttribute( $currentFolder ) . '" url="'. substr(SITE_ROOT_URL,0,strlen(SITE_ROOT_URL)-1) . ConvertToXmlAttribute( GetUrlFromPath( $resourceType, $currentFolder ) ) . '" />' ;
in this setup SITE_ROOT_URL has to ahve the trailing / otherwise you'll be missing a character at the end. hope this helps people. basically just adjust to your environment (ie editor is in /MailStorm/admin/editor and the require line goes back 8 levels and then into manage to make it to /manage/config.php
-- jerome
RE: absolute url's
RE: absolute url's
My email app is oempro.
This is what the email source looks like for the image location:
<img height="88"
src="/emailer/system/data/user_uploads/1/Image/folder1/company_logo.gif" width="200" alt=""/>
This is how it should be:
<img height="88"
src="http://domain.com/emailer/system/data/u ... y_logo.gif" width="200" alt=""/>
This is the piece of code in the fckeditor config.php file which I believe controls the image path:
I've also found a file which was included in the latest version of my email application which contains the following code to try to fix this problem but that obviously didn't work when it was created ... maybe somebody can see the flaw in it?
Any suggestions will be greatly appreciated. Thanks!