relative paths - again

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
lainyrache
Forum Members
Forum Members
Posts: 106
Joined: Thu Oct 05, 2006 11:27 am

relative paths - again

Post 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
lainyrache
Forum Members
Forum Members
Posts: 106
Joined: Thu Oct 05, 2006 11:27 am

Re: relative paths - again

Post 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
faglork

Re: relative paths - again

Post 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
faglork

Re: relative paths - again

Post 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
Locked

Return to “[locked] Installation, Setup and Upgrade”