I'm trying to integrate the FCKEditor into my CMS.
The problem I'm having is the absolute path for the images. I need it to say "<img src="http://www.somesite.com/userfiles/images/pretty.jpg"> rather than <img src="/userfiles/images/jpg"> Right now, it's SAVING the files in the correct directory, but the relative paths are preventing the images from displaying.
I've seen lots of solutions for PHP, and even one for .net, but nothing for ASP. And I have NO clue about PHP so I can't even carry over those solutions to ASP. Any ideas?
Wed, 05/02/2007 - 15:11
#1
RE: Absolute Path for Images
Its pretty simple to do what you want, on the server:
StrHTML = Replace(StrHTML,"src=""/userfiles/images/","src=""http://www.somesite.com/userfiles/images/")
RE: Absolute Path for Images
For instance, the CMS tool is located in a different domain on the server.
So /ROOT/www.CMSDomain.com/fckeditor/etc/etc
But it's saving the images in another directory: /ROOT/www.some-other-domain.com/userfiles/image/
Now, I've done a quick REPLACE command so that the final HTML code is correct (much like the previous suggestion). But in the actual fckeditor browser, it's not showing the image. Which is why I'd like to add an absolute path for it.
RE: Absolute Path for Images
Try my 'HOWTO - Get absolute urls with the filemanager': http://sourceforge.net/forum/forum.php? ... _id=257180
RE: Absolute Path for Images