[SOLVED] FCKeditor / Newsletters' images -> Absolute path

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

[SOLVED] FCKeditor / Newsletters' images -> Absolute path

Post by StudioZ »

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
Last edited by StudioZ on Tue 11. Sep 2007, 21:38, edited 1 time in total.
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Post by update »

/include/inc_ext/fckeditor/editor/filemanager/browser/default/connectors/php/config.php:

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'] = '' ;
perhaps there is something to tweak?
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

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/

:roll:

Really don't know where else to look at :?

Thanks,

Yves
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
Goran
Posts: 81
Joined: Thu 27. Nov 2003, 11:43
Location: Zagreb, Croatia
Contact:

Post by Goran »

Yves, I'm just curious, why you need absolute paths instead of relative paths?
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

Hi Goran,
Goran wrote:Yves, I'm just curious, why you need absolute paths instead of relative paths?
Simply for these reasons :
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. :wink:

Cheers,

Yves
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
Goran
Posts: 81
Joined: Thu 27. Nov 2003, 11:43
Location: Zagreb, Croatia
Contact:

Post by Goran »

Try following, works fine for me:

1. Open /include/inc_ext/fckeditor/editor/filemanager/browser/default/connectors/php/config.php
2. Replace

Code: Select all

$Config['UserFilesPath'] = $baseFolder.'/picture/upload/' ;
with:

Code: Select all

$Config['UserFilesPath'] = 'http://www.domain.com/picture/upload/' ;
3. Replace

Code: Select all

$Config['UserFilesAbsolutePath'] = '' ;
with:

Code: Select all

$Config['UserFilesAbsolutePath'] = '/home/user/public_html/picture/upload/' ;

Don't forget to change values for UserFilesAbsolutePath and domain name
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

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
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

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 :

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/' ;
Here's an example of the weird path it produces:

Code: Select all

<img src="/designhttp://www.logotypes.ca/design/picture/upload/image/myimage.jpg" alt="" />
I have the feeling that this is a bit crooked to accomplish :wink:
I would need to find the good way to edit my main phpwcms config file to make it match for my needs. :roll:

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';
If this is impossible I will just teach my customer on how to edit the paths in the Source (not user friendly tough :roll:)

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

Thanks,

Yves
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
Goran
Posts: 81
Joined: Thu 27. Nov 2003, 11:43
Location: Zagreb, Croatia
Contact:

Post by Goran »

StudioZ wrote: Here's what I edited :

Code: Select all

$Config['UserFilesPath'] = $baseFolder.'http://www.logotypes.ca/design/picture/upload/' ;
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.
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

Yep :D :D :D
My mistake :oops:
Forgot to remove the crucial $baseFolder. portion.

Your tweak is working perfectly :) :D

Thanks again Goran :wink:
You made my day 8)

Cheers,

Yves
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
Post Reply