I am just starting to implement FCKeditor into my site. I have got the file browser and uploader to work fine but what i am looking for is a way to change the text string describing the file location to exclude the first directory. I.e. i have set $Config['UserFilesPath'] to /images/ (so the files are uploaded to http://www.example.com/images) but because FCK wants to separate the files depending on their type (image, file, media, flash etc) it puts all the images into /images/image.
I can settle for this fine (when it puts the location of the image into the text created by the editor it works) but i am also using the file browser externally with the pick.js function. When that puts the file location in it, again it does the full path, but all of my pages in my current site assumes that all images are already in the /images/ folder so now it will think it is in the /images/images/image folder. Is there a way to tell the pick.js thing to not take the full path (ie not include the $Config['UserFilesPath'] string) so that it would only be /image/.
I hope you understand what my problem is. Thanks
Sun, 07/01/2007 - 09:24
#1
RE: modify image file location
path = path.replace(/^(\/images\/)/, '/') ;
RE: modify image file location