I've just started looking into FCKeditor and it seems to do pretty well all that I need (and a LOT more besides!).
The thing I now need to do is to control the 'insert an image' process and would be grateful if someone could point me in the right direction.
I want the user to be presented with a simple upload dialog (browse for local file and upload) and I want to control the stored image name, size, etc. and put the required URL in place automatically.
I'm working on a PHP project.
The thing I now need to do is to control the 'insert an image' process and would be grateful if someone could point me in the right direction.
I want the user to be presented with a simple upload dialog (browse for local file and upload) and I want to control the stored image name, size, etc. and put the required URL in place automatically.
I'm working on a PHP project.
RE: Controlling Image Upload
RE: Controlling Image Upload
Perhaps what I need is to find out how to control the 'insert image' button (is this what plugins is all about? I've not delved into that area yet) or build my own?
RE: Controlling Image Upload
RE: Controlling Image Upload
If you are using the default browser it is located at
editor/filemanager/browser/default/connectors/php/connector.php
RE: Controlling Image Upload
Many thanks. That seems to have me pointed in the right direction.
RE: Controlling Image Upload
I'm not getting as far with this as I'd hoped
What I'm trying to achieve is the following...
1. a user clicks on 'insert image'
2. a dialog opens asking for a file (jpeg) to upload and. The user presses the 'upload' button
3. a name is chosen by the system (eg. img001.jpg) for the uploaded file and the image is resized to 800x600 and copied to /uploads/folder1/img0001.jpg
4. the image is resized again to 300x150 and copied to /images/folder2/img0001.jpg
5. the URL of the image in the editor is set to /images/folder2/img0001.jpg.
The coding I can cope with. I know how to do all the image uploading, resizing and storing (in PHP) and I realise that I then need to return a URL to the editor iframe but I can't see how it all hangs together.
When the 'insert image' button is clicked, what code is executed? I assume a JS function leaps into action?
Can anyone help?
RE: Controlling Image Upload
RE: Controlling Image Upload
RE: Controlling Image Upload
1. folder plugins/fck_image changed to be called plugins/easyUpload
2. folder plugins/lang moved to be plugins/easyUpload/lang
3. files fckplugin.js and fck_image.html plugins moved from plugins to plugins/easyUpload.
These changes at least allowed the plugin to load but it's not working correctly yet and I'm guessing that all the other files unzipped to plugins should have gone to plugins/easyUpload.
RE: Controlling Image Upload
Re: Controlling Image Upload
all i want to do is this,
when i insert an image,i get a dialog,
i want to use the file upload dialog,
when i click "send it to server" i want my own program on server side to be called.
i tried editing,"editor\editor\dialog\fck_image.html",it doesnt work the way i wanted,
please help me...
[how do i change the value for action="" attribute,WHICH file should i edit for this]