Hello,
First of all, FCKeditor is excellent! Good Job! I want to contribute as much as possible.
I have modified the ColdFusion portion of the image/file upload and browser portion of FCKeditor. If anyone is interested, please let me know.
Thanks!
Russell
First of all, FCKeditor is excellent! Good Job! I want to contribute as much as possible.
I have modified the ColdFusion portion of the image/file upload and browser portion of FCKeditor. If anyone is interested, please let me know.
Thanks!
Russell
RE: ColdFusion
Hi Russell,
i'm very interested in your work
What have you changed exactly?
Thanks
Felix
RE: ColdFusion
Thanks!
Russell
RE: ColdFusion
thx
Markus
RE: ColdFusion
Hello,
Here is what I have. Let me know if you make any significant improvements to it. It is basic and simple bit it works.
http://www.oncinc.com/fckeditor/filemanager.zip
Thanks!
Russell
RE: ColdFusion
RE: ColdFusion
Yes, I'd be interested in seeing the source code. Thanks!
RE: ColdFusion
Hi Russell,
Neat idea. I noticed you used my original upgraded files as a basis (probably taken out of CMLite?).
I think you have an error in there. You rewrote the cffile statement and left out the ACCEPT parameter. Without that, the file cannot error out due to a forbidden MIME type, which in turn torpedoes the MIME-type CFCATCH stuff further on down. As such the error-trapping code is there but it'll never run.
I'll see if I can reverse-engineer your changes into the uploaders/browsers I did. If anyone is interested, you can find the files in the root folder of this free CMS tool:
http://mysecretbase.com/CMLite_Home.cfm
p.s. I built a browser that uses cfdirectory to navigate up/down a file folder tree, but my js skills were insufficient to allow it to work (once you click in the window the parent isn't listening anymore, from what I could tell). I lost the file that did that but I'd be happy to build it again if someone else knows how to do the js part of it.
RE: ColdFusion
Thanks for finding the error. Please let me know if I can help in any way.
Yes I did get some ideas from CMLite and made some changes to it.
I am interested in helping anyone with this. I would like to see this develop into something really nice and useful.
Thanks!
Russell
RE: ColdFusion
Russell,
I'm afraid the way you simplified my upload error trapping breaks it. Check out this template:
http://mysecretbase.com/testupload.txt
Save this file to your hard drive as a .cfm. Its a completely self-contained uploader that is hardwired to try and upload to c:\cfusionmx\wwwroot\.
There are comments in the file that will show you how to simulate a non mime-type error, and of course its easy to force a genuine mime error by uploading a forbidden type.
Your code doesn't take into account that cfcatch.mimetype will not be defined except in cases where there is a mime error. So on every other type of error your code will blow up since cfcatch.mimetype is undefined.
That example template is basically this one
http://mysecretbase.com/ColdFusion_Tutorial_02.cfm
Where I added in cfdumps so you could see the cfcatch scope's contents, which will immediately illustrate your problem.
On the plus side, I took your display code and added it to my own modified upload/browse templates (which use the same try/catch as the example above). Then I added in portability, so that you can plug in your own parameters, making them easily usable by any CF/FCKEditor installation.
Between your display changes and the new extensions I've added, the templates are pretty nice, although I would still like something that can navigate thru a folder tree. They're free for the taking at
http://mysecretbase.com/cmlite_home.cfm.
Click the Get It Now link, unzip what you get and you'll find the files in the root folder:
browse.cfm
browsefile.cfm
upload.cfm
uploadfile.cfm
FYI I have also altered the FCKEditor copy in that distro to make the file/image browser windows resizable. Just drag 'em bigger if you need to.
Cheers,
--Matt--
RE: ColdFusion
Let's try to create the ability to navigate a directory tree for the images. I did it for another project, but have been to lazy to try and port it for this project.
Thanks again!
Russell
RE: ColdFusion
RE: ColdFusion
Russell,
I built a navigable version and bolted it onto the image version of the browser. The navigation will not function with the image dialog, I'm sure (haven't tried it, actually . Thats where we need someone who knows js.
http://mysecretbase.com/browse_new.zip
The folders are not within the select box. If you can figure a way to do that (perhaps another select box above the field list if any subfolders exist) have at it.
Now, don't freak out when you see all the code involved. It doesn't take much at all to just navigate up and down a tree, but it *does* take a bit more to make sure some bozo can't slip in a path like "../../../../../../../../../../../../inetpub/wwwroot/"
or worse. The extra code you see deals with this. The idea was that this could be used by a user who has only restricted folder tree permissions. They can get to the specified base root, and any children, but no matter what they do they cannot go higher, nor can they switch drives on you and go exploring, or any other similar nonsense.
If you can build this in to work I/you can take that and make a matching file link version.
Cheers,
--Matt--
RE: ColdFusion
This looks good! I will look at this and see if I can help on any javascript. It will be a while before I can do much though, I will be working on a project in Canada and will not return for about a month.
In the meantime, if anyone does anything with this, please let us know so that we might be able to take advantage and improve upon it.
Thanks again!
Russell
RE: ColdFusion
I see a whole bunch of discussion here and links to zip and cfm files and I am confused, for everyone's benefit:
What files do I need to make this uploader/manger work?
Where should I put these files?
What changes do I need to make to which files to integrate this?
Much thanks for the great work. I am a cf guy and hope to help contribute, but I need to get this thing working...
RE: ColdFusion
Looks like I should have glanced at this thread about a month ago, or subscribed to it.
See my 2004-05-19 15:18 post. It gives the location of the free cms that has the improved FCKEditor file set. It also tells you the names and locations of the four files you'll need. You can use the cms -- which has an automated installer -- as a working example of a CF installation as well.
Next, if you want to see the updated browser that can navigate thru a folder tree (and nothing else untils someone who knows javascript gets hold of it) see my 2004-05-27 17:23 post for the link to that file. If you can fix it the js so it is still listening after you have nav'd around some folders, we'll all be really happy . I can do the CF and have done so, but the js is not my bag.
RE: ColdFusion
The smart navigation works nicely, at least. Same problem as when I did this before: If you click on anything the js functions (yours included) no longer fire.
I'm sure this is ridiculously simple to overcome. I'm just not a js guy.
RE: ColdFusion
Hello Matt,
I have been out for a long time doing some project work for some of my clients hence the extreme delay in this message.
I have resolved the JavaScript problem you were having. Please read my email that I posted to CF-Talk below.
Thanks!
Russell
Hello,
I resolved it and thought I should post what the solution in case someone was wondering. I came accross the solution by accident, so I cannot really explain why this has resolved it.
On the new window, I have added opener to the JavaScript.
<SCRIPT language="JavaScript">
<!--
var sImagesPath = "http://www.test.net/UserFiles/" ;
function getDoc(fileName)
{
window.opener.setimage( sImagesPath + fileName ) ;
window.close() ;
}
// -->
</SCRIPT>
Thanks!
Russell
----- Original Message -----
From: Russell Patterson
To: CF-Talk
Sent: Wednesday, September 29, 2004 4:52 AM
Subject: OT: JavaScript - FCKEditor
Hello,
I found a similar problem on the CF-Talk archives, but it was not exactly what I needed. I am using FCKEditor in a project and love the editor. I am trying to customize the links page and have run into a problem that is beyond me. I know virtually nothing about JavaScript and would appreciate some help.
I am using Internet Explorer 6.0 running under Windows XP SP2.
A web page dialog box opens a new window where you can select an filename from a list box. Once you double-click the list box, it closes the window and populates the selected filename into a form field in the web page dialog box. Everything works great as is. However, I need to be able to select filenames from other folders, so each time someone selects a new folder to list, it refreshes the screen which causes a nice little JavaScript error whenever someone selects a filename to populate the web page dialog box. So what I have deduced thus far is that as long as the page is not refreshed, the new window will remember the web page dialog window.opener information that opened the new window.
Here is the JavaScript code from the web page dialog that opens the new window.
function browserServer()
{
var oWindow = openNewWindow(sBrowseURL, "BrowseWindow", iBrowseWindowWidth, iBrowseWindowHeight) ;
oWindow.setImage = setImage ;
}
Here is the code from the new window.
<SCRIPT language="JavaScript">
<!--
var sImagesPath = "http://www.test.net/UserFiles/" ;
function getDoc(fileName)
{
window.setImage( sImagesPath + fileName ) ;
window.close() ;
}
// -->
</SCRIPT>
....... body content here.........
<SELECT name="BrowseImage" size="11" onDblClick="getDoc(this.value);">
<OPTION value="Test/test.pdf">test.pdf - 161 KB</OPTION>
<OPTION value="Test/test1.pdf">test1.pdf - 19 KB</OPTION>
</SELECT>
JavaScript error message.
Object does not support this property or method.
Any suggestions on this is greatly appreciated.
Thanks!
Russell
RE: ColdFusion
Inside a textarea tag? Didn't work.
An example would help.
Rob
RE: ColdFusion
I'm using V2 RC2 on CFMX/IIS. My client machine is WinXP using FF1 and IE6, and OSX with same.
Thanks for any help.
Michael
RE: ColdFusion
In any case, I'm interested in mucking about with the CF browser / connector. I'm thinking the folder type should also be an application variable, defaulted to the types already indicated. I'll get it working on my sites in a generic enough way that it'll still be useable here. I've never uploaded a file to a Sourceforge project, so I may need some hand holding when it comes time to upload.
I love this editor!