[SOLVED] FCKeditor / Newsletters' images -> Absolute path
[SOLVED] FCKeditor / Newsletters' images -> Absolute path
Anyone would know where I could edit the necessary FCKeditor config file,
to make images inserted through the FCKeditor FileManager, use absolute paths instead of relative paths ?
Thanks,
Yves
to make images inserted through the FCKeditor FileManager, use absolute paths instead of relative paths ?
Thanks,
Yves
Last edited by StudioZ on Tue 11. Sep 2007, 21:38, edited 1 time in total.

PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
/include/inc_ext/fckeditor/editor/filemanager/browser/default/connectors/php/config.php:
perhaps there is something to tweak?
Code: Select all
// Path to user files relative to the document root.
//$Config['UserFilesPath'] = '/userfiles/' ;
$path = explode('/include/',$_SERVER['PHP_SELF']);
$baseFolder = empty($path[0]) ? '' : $path[0];
$Config['UserFilesPath'] = $baseFolder.'/picture/upload/' ;
// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Usefull if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = '' ;
Thank you Claus for your hint !
Unfortunetly and without success, tried all sorts of flavors
and combinations possible to make FCKeditor pull the images from this absolute path:
http://www.logotypes.ca/design/picture/upload/
Really don't know where else to look at
Thanks,
Yves
Unfortunetly and without success, tried all sorts of flavors
and combinations possible to make FCKeditor pull the images from this absolute path:
http://www.logotypes.ca/design/picture/upload/

Really don't know where else to look at

Thanks,
Yves

PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
Hi Goran,
I created a newsletter template where all the basic recurrent images like
the logo etc. ... are setup in the template with absolute paths.
This way, all the images appear in any email client.
The CSS is defined inside the template.
The only way to make it behave as expected (AFAIK).
Now... just for the editorial images which need to be changed from times to times... I need my customers to
easily present these without having to go in FCKeditor's source view,
modifying the relative paths to absolute paths.
Although... If this is not possible I will simply edit these images paths
by hand, the hard way.
Cheers,
Yves
Simply for these reasons :Goran wrote:Yves, I'm just curious, why you need absolute paths instead of relative paths?
I created a newsletter template where all the basic recurrent images like
the logo etc. ... are setup in the template with absolute paths.
This way, all the images appear in any email client.
The CSS is defined inside the template.
The only way to make it behave as expected (AFAIK).
Now... just for the editorial images which need to be changed from times to times... I need my customers to
easily present these without having to go in FCKeditor's source view,
modifying the relative paths to absolute paths.
Although... If this is not possible I will simply edit these images paths
by hand, the hard way.

Cheers,
Yves

PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
Try following, works fine for me:
1. Open /include/inc_ext/fckeditor/editor/filemanager/browser/default/connectors/php/config.php
2. Replace
with:
3. Replace
with:
Don't forget to change values for UserFilesAbsolutePath and domain name
1. Open /include/inc_ext/fckeditor/editor/filemanager/browser/default/connectors/php/config.php
2. Replace
Code: Select all
$Config['UserFilesPath'] = $baseFolder.'/picture/upload/' ;
Code: Select all
$Config['UserFilesPath'] = 'http://www.domain.com/picture/upload/' ;
Code: Select all
$Config['UserFilesAbsolutePath'] = '' ;
Code: Select all
$Config['UserFilesAbsolutePath'] = '/home/user/public_html/picture/upload/' ;
Don't forget to change values for UserFilesAbsolutePath and domain name
I don' t have a phpWCMS installation to experiment with, but you might investigate this post from the FCKeditor forums:
http://fckeditor.biz/viewtopic.php?p=2530#2530
http://fckeditor.biz/viewtopic.php?p=2530#2530
Thank you Goran for your help !
It partially work for my test.
I edited as you suggested and for me, the way I am setup, "logotypes.ca" being an addon domain to my main domain account "malouin.ws".
Here's what I edited :
Here's an example of the weird path it produces:
I have the feeling that this is a bit crooked to accomplish
I would need to find the good way to edit my main phpwcms config file to make it match for my needs.
Here's what I feel may needs to be edited the right way:
If this is impossible I will just teach my customer on how to edit the paths in the Source (not user friendly tough
)
Will see what else I can find when I am back ...
Thanks,
Yves
It partially work for my test.
I edited as you suggested and for me, the way I am setup, "logotypes.ca" being an addon domain to my main domain account "malouin.ws".
Here's what I edited :
Code: Select all
$Config['UserFilesPath'] = $baseFolder.'http://www.logotypes.ca/design/picture/upload/' ;
Code: Select all
$Config['UserFilesAbsolutePath'] = '/home/malouin/public_html/logotypes/design/picture/upload/' ;
Code: Select all
<img src="/designhttp://www.logotypes.ca/design/picture/upload/image/myimage.jpg" alt="" />

I would need to find the good way to edit my main phpwcms config file to make it match for my needs.

Here's what I feel may needs to be edited the right way:
Code: Select all
// $phpwcms['site'] = 'http://'.$_SERVER['SERVER_NAME'].'/';
$phpwcms["site"] = "http://www.logotypes.ca/";
$phpwcms['DOC_ROOT'] = $_SERVER['DOCUMENT_ROOT'];
$phpwcms['root'] = 'design';

Will see what else I can find when I am back ...

Thanks,
Yves

PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
Yves, this is wrong...read again my instruction above, you need to remove $baseFolder. from 'UserFilesPath'.....and leave only the url path to /picture/upload/ directory. I have tested and this setting works 100% on my installation.StudioZ wrote: Here's what I edited :Code: Select all
$Config['UserFilesPath'] = $baseFolder.'http://www.logotypes.ca/design/picture/upload/' ;
Yep
My mistake
Forgot to remove the crucial $baseFolder. portion.
Your tweak is working perfectly
Thanks again Goran
You made my day
Cheers,
Yves



My mistake

Forgot to remove the crucial $baseFolder. portion.
Your tweak is working perfectly


Thanks again Goran

You made my day

Cheers,
Yves

PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!