Page 1 of 1

relative paths - again

Posted: Thu Apr 19, 2007 5:32 pm
by lainyrache
I have struggled with this from upgrade to upgrade and was hoping someone might have found a solution that works for them.
I am using CMS 1.05
I  want to use relative paths on image and file uploads (via fckeditor) - so moving server is easier.

I have changed the following paths from default in config.php to

$config['uploads_url'] = 'uploads';
$config['image_uploads_url'] = 'uploads/images';

This gives me the relative paths I need in the fckeditor uploads.

All seems fine apart from
1. Filemanager
It is  now using the admin folder in the link path when I try to view an uploaded file
I get http://www.url.dreamhosters.com/cms1/ad ... /test.html
Instead of  http://www.url.dreamhosters.com/cms1/up ... /test.html

Code: Select all

( coming from line 305 in admin/files.php ?) $filetext .= '<td><a href="'.$file_links.'" rel="external">'.$file.'</a></td>'; 
2. Image manager

I can't view images in image manager - the path is coming up with
http://www.url.dreamhosters.com/cms1/li ... /logo1.gif
What I need to know 
Is there a simpler way of setting relative URLS's without battling with settings on the modules?
If they do need changing what's the most straightforward method?
I'd really appreciate any guidance on this from anyone that has a relative url method that works for them .
Thanks

Re: relative paths - again

Posted: Fri Apr 20, 2007 1:45 pm
by lainyrache
Follow up

It's only the fck editor that put hard coded url's into the pages.

So I have completely changed my approach.

Config.php - keep as my default install ( with full paths )

Change settings in the fckeditor

/modules/FCKeditorX/FCKeditor/editor/filemanager/browser/default/connectors/php/config.php
change
$Config['UserFilesPath'] = $config['uploads_url'] ;
to
$Config['UserFilesPath'] = 'uploads';
___________________


/modules/FCKeditorX/FCKeditor/editor/filemanager/upload/php/config.php

change
$Config['UserFilesPath'] = $config['uploads_url'].'/' ;
to
$Config['UserFilesPath'] = 'uploads/';

--------------
I now have relative urls for uploaded files.

Images are not showing in the image manager and image uploads have full path.
~Working on it!
If anyone has worked out a good clean solution please let me know
Thanks

Re: relative paths - again

Posted: Wed Sep 05, 2007 6:57 pm
by faglork
Just in case you are still interested or anyone else has that problem (I use CMS 1.1.2 and the problem still exists):

I changed
/modules/FCKeditorX/FCKeditor/editor/filemanager/upload/php/config.php


$Config['UserFilesPath'] = $config['uploads_url'] ;
to
$Config['UserFilesPath'] = '/uploads/images/';

and
$Config['UserFilesAbsolutePath'] = $config['uploads_path'].'/' ;
to
$Config['UserFilesAbsolutePath'] = '' ;

hth,
Alex

Re: relative paths - again

Posted: Fri Sep 07, 2007 6:41 pm
by faglork
Have a look at
http://forum.cmsmadesimple.org/index.ph ... 838.0.html

where we try to figure it out ... it's a huge mess IMO.

Cheers,
Alex