Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 12:19:58 AM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155556 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: FCKeditor and images  (Read 10360 times)
succhi

Offline Offline

Posts: 72


« on: March 06, 2006, 01:53:55 PM »

I haven't looked too deeply into this yet but I was wondering if anyone had been able to work out how to get FCKeditor to insert an image with WB_URL or the like as the start to an image url. Currently all images inserted using FCKeditor browser will insert full urls which become broken when a site is moved e.g. from a dev server to another or from one folder to another.

Stuart.
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7973



WWW
« Reply #1 on: March 06, 2006, 02:45:05 PM »

Hello,

to change the absolute path to an relative path go to modules/fckeditor/fckeditor/editor/filemanager/browser/default/connectors/php/config(dot)php and change line 27 and 33. (Delete WB_PATH and/or WB_URL).

Matthias
Logged
succhi

Offline Offline

Posts: 72


« Reply #2 on: March 06, 2006, 03:04:35 PM »

Thanks.

Just a quick question before I delete those parts. Where is it now relative?

It's just that I have put up a WB site for a client and somehow they managed to do something I didn't expect like most clients. They started to upload images through the browser (at the bottom) whilst the resource type was set to 'file'. Most non-techie types don't even think to swap this to image, even if you do it is still not apparent what has happened. So I have told him to make all his folders etc under file so now he doesn't have to worry about all that (no 'all' resource or the like just everything under 'File'). So all images are WB_URL/media/File/Folder/image.jpg. If the url is relative I guess it just becomes /media/File/Folder/image.jpg which is fine. Perhaps I just answered my own question. However if it was in a folder and I deleted the WB_URL then /media would not resolve. I should be OK because I am working from the root file however when I develop at home I don't work from root.

Stuart.
Logged
succhi

Offline Offline

Posts: 72


« Reply #3 on: March 06, 2006, 03:33:40 PM »

What would be really nice is when we (if we) have the ability to have abitrary code passed anywhere in a site. An example would be like in my thoughts for WB3.0 http://forum.websitebaker.org/index.php/topic,1676.msg16692.html#msg16692

There I mention being able to possbily have tags in content and having those parsed and eval'd before serving. If that were the case you could enter a url into the document that looked like "http://[wb:wb_url /][wb:media_directory /]/folder/image.jpg". Now that would be super nice and very portable. It's not too much of a stretch in my books. Already we have things like [wblink1] resolve when it is place in the content so this kind of parsing is already happening. Formalising it and hooking that into modules/code snippets etc would be way cool.

Stuart.
Logged
adiwillow

Offline Offline

Posts: 64


« Reply #4 on: November 01, 2006, 08:58:16 PM »

Hello,

to change the absolute path to an relative path go to modules/fckeditor/fckeditor/editor/filemanager/browser/default/connectors/php/config(dot)php and change line 27 and 33. (Delete WB_PATH and/or WB_URL).

Matthias

hmm this is fine if you do it before you start the site, but when doing on an already existing site, it seems to have no effect?
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7973



WWW
« Reply #5 on: November 02, 2006, 06:02:37 AM »

Hello,

this has only affect of pictures wich are stored after the changes. The changes you do in the FCKEditor files did not restore all "old" links in the database. If you wanna have the relative path to all existing pictures, delete them and add them new after you have mad the changes in the FCKEditor modul.

Matthias
Logged
augustocsm
Guest
« Reply #6 on: June 16, 2009, 02:53:28 PM »

Using PHP 5.29, I just figured it out just adding the follow PHP script on the file basexlm.php under the function CreateXmlHeader
---------------

//get the complete URL
$serverURL = "http://".$_SERVER['HTTP_HOST'];


    // Add the current folder node --- and input the var $serverURL just after . '" url="'

echo '<CurrentFolder path="' . ConvertToXmlAttribu te( $currentFolder ) . '" url="'. $serverURL . ConvertToXmlAttribu te( GetUrlFromPath( $resourceType, $currentFolder, $command ) ) . '" />' ;


// from now on the url starts to come up on the script com when some image is added
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!