I am developing a PHP based CMS and use the FCKeditor quite a bit. I am glad that the CKEditor is being developed, I think that a restart on this project would be great to clear and clean up some of the present bloat that comes on with old age
Not to suggest the FCKeditor is bad, quite the opposite. It's pretty amazing.
That being said, there is a very important topic that's always been a bit touchy and I'm not sure how well resolved it is even now, last I touched it was 2.61 and I'm just getting into 2.63 now:
Presently if you are running FCKeditor in one folder and viewing the images uploaded from another and the upload directory relative to the fckeditor is different from the link relative the actual site you NEED to use absolute links because there is no "dual relative link system"
ie:
site/CMS -> CMS installation (where the fckeditor is viewed from)
site/CMS/fckeditor -> FCK installation
site -> Where the fck entries are viewed from
site/cmsupload -> directory where fck files are uploaded
so the FCKeditor would need to see ../cmsupload folder but would need to actually save ./cmsupload in order for a relative link to work properly. I could do a find/replace on those strings when saving and then reverse the process when loading the fckeditor values and it would work.
Bear in mind there is further issue when we try relative paths whereby the required relative path for upload to the proposed site/cmsupload folder requires such a string as:
../../../../../../cmsupload/
which then gets pushed into the path after upload unless absolute links are selected. This is of course to navigate upwards from the present connection.php file.
A cleaner implemenation of this entire path structure would be nice.
If we could have a relative pathing system where the upload directory of the php config is one value, the path inserted into the upload field after a successful "send to the server" is another value and finally the actual image is viewed with another relative path overwritten I think we'd be a lot better off than the present need to go based on absolute links.
so I could then set the php upload path to:
../../../../../../cmsupload/
Then the fckeditor would substitute in after uploading:
./cmsupload
However would detect that link as relative and when displaying it would internally replace ./cmsupload with:
../cmsupload
All based on the config variables of course. Any thoughts or advice for other methods of handling this quandry?
Mon, 09/08/2008 - 21:33
#1
Re: About Relative vs Absolute Links
Can't this be solved with the BaseHref setting?
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: About Relative vs Absolute Links
Hmm, yes.
Sorry, I've done a few searches on the issue but should have really just rtfm.