image previews for the FCKeditor file manager
This week, I’ve been tackling a huge number of work, upgrading our in-house CMS to bring it up to a “Product” status. A lot of the work is internal, and will probably not be open-sourced for a while, which is a pity. This work included a lot of AJAX work – changing all our menu systems to load on the fly, adapting our Pages menu so we can re-order pages by simply dragging them around. A lot of work.
The first piece of OS to come out of this is a previewer for FCKeditor. In the file manager, if you don’t know what an image looks like, you now just have to hover over the filename, and half a second later, a small info-window will appear with a generated thumbnail.
The example is here. Click the image icon, then the browse server button. when you hover over an image link for .5 seconds, a small image preview box pops up with some info.
You can download the changed files here.
This is really just a base for tomorrow, when I write an image manipulator so you can resize, rotate, etc, online, instead of needing a graphics editor.
nice job you’ve done! tried it also myself but something didn’t work out (filelist is not generated although i have files in the direcory and also uploading doesnt work).
i replaced following files:
is there anything else i should replace? or the problem is somewhere else?
yes, those are the files. I think there was a CSS one as well, but it’s cosmetic.
the problem is probably the dependency on Pear’s Image_Transform. Are you sure you have it installed on the server?
Very nice! Only one thing: why didn’t you build it with GD? Most servers over here have GD, but not PEAR.
And btw, any chance that your work on this will be accepted into mainline FCK?
Arjan, I built it with Pear because that’s what I use on my own server – it abstracts away all of the icky stuff, leaving my source relatively light.
As for whether it will be accepted into the main body of work – I don’t know 😉 – I may be required to re-write it with GD (or write a conditionally included abstraction layer) in order to make it palatable to most folk
Watch this blog – later today, I’ll be posting an update, with the ability to resize and rotate images, and some icons for the context menu.
Okay – I rewrote the code in GD: http://verens.com/archives/2006/03/24/resizing-and-rotating-in-fckeditor/
Hello Kae. Great work with that feature… really useful. I wanna ask for your help. I configured the FileManager of FCKeditor, but I’m having problems with the path where the Files are gonna be saved. I want to save the files outside the FCKeditor directory, like this:
[ ROOT ]
| |- [ CMS ]
| |- [ FCKeditor ]
|- [ UserFiles ]
You can see that I’m using a Home made CMS. Can I do that? or… is not posible, and I’ve to put the [ UserFiles ] directory inside the [ FCKeditor ]
Any help/link would be helpful. Any tips for the FileManager are also welcome and very useful. Thanks in advance.
JavieR, you might be interested in the work going into KFM (a file manager plugin I wrote initially for FCKeditor).
Version 0.7 has been planned, and one part of it is to use mod_rewrite to redirect requested files through the engine (allowing logging, authorisation, etc).As a side-effect, this allows you to have your files outside your main web-accessible area, as you’ve asked.Please try out KFM to see if it will work on your server. If so, keep an eye on it – your wish will be granted soon (within a week or two, if time goes my way).