Hi,
Just came up to this idea while I was moving from one to another server.
For example when you move site from server A to server B, I noticed that pictures (and maybe some other content) doesnt work, as their url is stored in database like www.serverA/media/image1.jpg and I had to manualy overwrite all paths to www.serverB
So my idea is to use a droplet when you add a picture from wysiwyg or others module, to replace www.serverA.xy/ with [[WB_URL]] or something like that - droplet :) So when you preview source code in wysiwyg to see link as [[WB_URL]]/media/picture1.jpg
what do you think ?
cheers
i think thats a task for fck editor, maybe it can be modified to set the wb url by inserting images
Content can be changed with a droplet
Simply scan the content for www.serverA and replace with www.serverB
BTW
You should allways use relative links (../pictureurl/picture.gif) , not absolute (http://www.server.com/pictureurl/picture.gif) .
Have fun.
John
yes, but when you call a picture from a wysiwyg you get absolute link.. :)
Right, fck editor hands out absolute urls, which is slightly annoying.
I've always dealt with it by search-replacing the absolute urls in the MySQL dump when publishing a site...
Indeed this is one of the most annoying issues of WB!
Don't know if this issue is addressed earlier, but maybe we should make a ticket of it?
Vincent
Maybe? I made one :wink:
I thing this would be a gread Feuture!
CU Moritz
Problem lies in the WB_PATH and WB_URL, these are needed for when a website resides in a subdir, ie
www.domain.nl/somedir/
You could manual change:
/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/config.php
Line 52
$Config['UserFilesPath'] = WB_URL .MEDIA_DIRECTORY ;
to
$Config['UserFilesPath'] = MEDIA_DIRECTORY ;
If a subdir is used change it to:
$Config['UserFilesPath'] = '/somedir' .MEDIA_DIRECTORY ;
I tried and it worked at my end. xampp on windows xp
Worked with pictures and file-links
If it works with you lot, maybe add it to the created ticket to get /somedir in a variable like WB_URL, maybe WB_PATH or WB_ROOT or something.
This can be used in FCK and Xinha and TinyMCE to make them userconfigurable
Maybe add it as a setting in the backend so changes could be on the fly.
Have fun,
John
PS
This needs thorough testing because of the homefolders feature!!
Quote from: sare on November 11, 2009, 08:32:15 AM
Right, fck editor hands out absolute urls, which is slightly annoying.
I've always dealt with it by search-replacing the absolute urls in the MySQL dump when publishing a site...
Yes, and this is exactly why I started this thread and wanted to hear your comments.. :)