The forum operates in read-only mode.
Please head to StackOverflow for support.
<cfset daFile = '<?xml version="1.0" encoding="utf-8" ?>
<cfset daFile = '<?xml version="1.0" encoding="utf-8" ?>
OK I took Denny's file and chopped it up but good. You can find it at http://mysecretbase.com/connector2.txtI'll keep modifying this file as needed. I actually have taken zero time to test this code, I'm afraid. Hopefully there are no typos or stoopid things hiding in here.I have corresponded with FredCK and it appears as if the person responsible for ColdFusion support has gone missing. Its up to all of us to fill in the gap.Here's what I did to Denny's file:getfoldersandfiles -does not use queries generated from cfdirectory output. Instead uses two loops over the data returned by cfdirectory.-Changed how the xml was created so it doesn't use the quick/dirty method originally used. createfolder-changed the newfoldername illegal character test to allow upper or lowercase alpha chars, plus numbers and underscores via ReFind(). This may or may not be an improvement depending on your point of view on what constitutes a valid directory name. fileupload-Added MIME type checking. Simple ext's can be spoofed, but not cffile's accept parameter (we hope). -Kept the ext check to cover simple mistakes, but rather than checking for denied extensions the system checks for allowed extensions and rejects everything else. Changed the method this is accomplished by to use ListContains() instead of a loop, and reworked it so the process returns an invalid file status code to the calling dialog rather than dying with a js alert.in general-rewrote the xml generation into cfscript cuz I think the more verbose syntax I used looks a little cleaner in it.-Runs out of a cfswitch instead of cfelseifs for better efficiency.-most of the cfcatch statements had cfaborts in them, which would stop the connector from reporting back to the calling dialog.-put all attributes in quotes. to do-Break out the createfolder name test regex to a variable so you can specify the validation string of your choice.-Figure out how to change the file extensions and MIME types allowed by display type: Image/Flash/media/files.-We need to do checks to make sure the directory the user is planting themselves in via navigation is really a valid one and they are allowed to see it (i.e. it is not higher up than the designated root; and its on the same drive)
I never got anything from you . At a guess it hit my antispam gateway and got bumped. Not sure, but you would have gotten a bounce message. If you can tell me your email address I can whitelist it.Worst case can you post a txt file somewhere that my browser can hit? Or try again? Sorry.With respect to the cfloop: no, what I did is correct and, since its scoped, best practice. Seehttp://livedocs.macromedia.com/coldfusi ... #wp1101138Check the top example. Same syntax. You can do [CurrentRow] if you like but its unnecessary. But anyway whatever works is fine with me. Just want a solution for all of us...No its not disdplaying folders/files, but that may very well be due to my own ineptness when it comes to specifying a root folder. If you or someone else could point me to the right settings for an implementation whose root is located at c:/cfusionmx/wwwroot/fckeditor/then I could get past what is no doubt a problem on my end.
Ok, now we got a at least working connector. Not the prettiest code, but hell, it works and we can clean it up better latter. I've sent Matt a zip, and in case it didn't get through, I've stuck it in a web-accessable place:http://www.unm.edu/~dvalliant/FCKeditor/I've got it set up for mcukstorm's connector, and it is doing the nifty iconlookup bit for the big icons.I'd like to look into the possibility of haveing a 'view' option in the browse window, ie 'list' or 'thumbnail'... should be a piece of cake but I'm stuffed at the moment. =]
OK I worked over the code Denny sent me from this last go-round. Its at the same url:http://mysecretbase.com/connector2.txtThe notes on what I changed are in comments at the very bottom of the file. I tried to stick to changes that were functionally required but I did let a couple of personal prefs creep in with the stuff I changed.FredCK has expressed concern that we are forking the project with all of these added features, and I think we have to respect his wishes to keep his official project files as 'clean' as possible. With that in mind when we're done here we'll carve out a smaller version that sticks to his specification. We can always keep an 'enhanced' version up for folks who want to go for the bigger feature set. I've added a few things myself but, all in all, the extra stuff will be very easy to cut out given the structure of the connector.Left out of this build but absolutely necessary is directory security. I have started this with a DirectoryExists() test but what we really need is a series of tests to ensure the user is still on their allowed path and hasn't managed to jump drives or folder trees on us as part of a hack. That will come but I'm out of time for today.Lastly, I have tested *nothing* here. I only had time to run thru the code top to bottom once (which took a few hours in and of itself) No time to do more today. If I have a typo or did something dumb its there for everyone to see.
If anyone is interested, I found CFFM *VERY* easy to integrate with FCKEditor.....Take a look at http://www.webworksllc.com/cffmI made some simple modifications to make it work well with FCKeditor - if anyone wnats the code please email me.It also integrates file upload, image manipulation, etc...Rick Rootrick youknowwhatgoeshere webworksllc.com
The version of CFFM for FCK is now available for download.See http://www.webworksllc.com/cffmI released version 0.97b yesterday, fixing a minor bug in CFMX involving an empty directory.
btw it's got some really cool features too if you haven't seen it, like image manipulation, uploading multiple files at once, uploading zip files then unzipping on the server, etc.Actually I think the image manipulation is the coolest part about it - Rick
It will not work in CF5, for several reasons.#1 - it uses a CFC for image manipulation, and CFCs did not exist in CF5.#2 - it relies heavily on UDFs, all of which are written in regular CFML tags instead of cfscript, a feature that was not available in CF5.#3 - In addition to the use of java for image manipulation, it uses java for listing zip file contents and for unzipping files.You could probably modify it to work with CF5, but you'd have to remove a lot of the functionality, and rewrite ALL of the UDFs in cfscript. I did write another CF-based filemanager app back in 2000 that you're welcome to play with. I even modified it just now to work with FCK 2.0 but I haven't tested it. It is terrible code (suitable for CF4.0!!) and is far less feature rich.http://www.webworksllc.com/filemanager/
Okay, glad to know that before I delved any further into it. I probably won't bother trying to get it to work with CF5. The way I have my application set up, users can easily choose either version 1.6 or version 2, so if they don't have MX, at least there's the option of 1.6. I may just redo the image browser/uploader I was using for 1.6 and see if I can get that to work. Doesn't have quite the functions yours does, but has the basics at least. Sometimes for the average user, simple is better.
I wanted to mention that I released CFFM v1.0 a short while ago, and the fckeditor version is included in the main package.http://www.webworksllc.com/cffm