I have tweaked the file upload in the ColdFusion version of FCKEditor, and it works a charm, so that I can upload images to the server as I write the content. Brilliant!
Now I need to change the "Browse Server" functionality to use a dynamic coldfusion page that will show the images that are actually in the userimages directory, including the one just uploaded. The only server browse file I have been able to find is one at /FCKEditor/filemanager/browse/sample_html/browse.html.
What do I need to change for it to use a different file instead. I need it to use a file /FCKEditor/filemanager/browse/imagecatalog.cfm instead.
This is one I've written myself that checks on the
contents of the directory /userimages/ and lists out the .jpg and .gif files inside.
Cheers
Mike Kear
AFP Webworks.
Windsor, NSW, Australia.
Now I need to change the "Browse Server" functionality to use a dynamic coldfusion page that will show the images that are actually in the userimages directory, including the one just uploaded. The only server browse file I have been able to find is one at /FCKEditor/filemanager/browse/sample_html/browse.html.
What do I need to change for it to use a different file instead. I need it to use a file /FCKEditor/filemanager/browse/imagecatalog.cfm instead.
This is one I've written myself that checks on the
contents of the directory /userimages/ and lists out the .jpg and .gif files inside.
Cheers
Mike Kear
AFP Webworks.
Windsor, NSW, Australia.
RE: Making "Browse Server" dynamic?
RE: Making "Browse Server" dynamic?
I am controllling the size and type of files being uploaded with the upload.cfm template, and any doubtful files are deleted automatically and can't be used.
RE: Making "Browse Server" dynamic?
RE: Making "Browse Server" dynamic?
I have fixed up the "Browse Server" part of image uploading to work with CFdirectory, and expanded it to work with any file type (not just jpg's). Wanna trade code?
1. First, as John says change the config to point to browser.cfm instead of browser.html. Then copy browser.html to the new file browser.cfm.
2. Add this to the top of the file:
<cfset variables.FTPPath="C:\CFusionMX\wwwroot\blahblah\">
<cfdirectory
directory="#variables.FTPPath#"
Name="myDirectory"
Sort="name ASC">
3. Remove the .jpg suffix from the js function GetImage
4. Make this the output td:
<TD width="50%" align="left">
Click on an image<BR>
<cfoutput query="myDirectory">
<A href="javascript:getImage('#myDirectory.Name#');">#myDirectory.Name#</A><BR>
</cfloop>
</TD>
Thats it. How'd you do the upload? I can get it to upload, but it won't display for me. All I get is a red X