Hi
I use FCKEditor 2.3.2 in the knowledgebasePublisher (http://kbpublisher.sourceforge.net/). Everything is fine and simple.
I want to see my pictures (as thumbnail?) after upload in the browser to choose them. It's difficult to choose a picture named DSCN7652.jpg. I want to see it as thumbnail. Is that possible?
I also looked in the forum here. But I only found something about browsers without understanding what to do.
Greetings from germany
Herr Sin
Fri, 04/13/2007 - 02:50
#1
RE: Choosing pictures after upload
.fileinstance
{
color:grey;
width:10%;
height:100%;
border-width:thin;
border-style: dashed;
background:#ccccff;
}
And in the code I told you to change, change it to this instead....
(notice I removed the tables, it was having trouble with that for some reason)
return '<div class="fileinstance">' +sLink +
'<img alt="" width="100px" src="'+fileUrl+'" border="0">' +
'</a>' +
' ' +
fileSize +
' KB' +
'</div>';
If this is all a bit confusing gets omeone to help you. Or email me
graham@thelondongayscene.co.uk
RE: Choosing pictures after upload
Herr Sin , in case your still watching this topic, its very easy to enable this functionality. All you need to do is the following.....
Step 1)Locate the file "frmresourcelist.html" which is in editor/filemanager/browser/default
Step 2)Open it up in a text editor like EditPlus2.
Step 3)Go to line 61 (or there abouts) and you will see the following code......
return '<tr>' +
'<td width="16">' +
sLink +
'<img alt="" src="images/icons/' + sIcon + '.gif" width="16" height="16" border="0"></a>' +
'</td><td> ' +
sLink +
fileName +
'</a>' +
'</td><td align="right" nowrap> ' +
fileSize +
' KB' +
'</td></tr>' ;
You need to change that code. So just delete that bit and replace with my code below.
You can see what Im doing and you can feel free to play with it to get the html formatting the way you like it, for instance put a border around the image and the file size to make things clearer...
return '<table><tr><td>' +sLink +
'<img alt="" width="100px" src="'+fileUrl+'" border="0">' +
'</a>' +
'</td><td align="right" nowrap> ' +
fileSize +
' KB' +
'</td></tr></table>';
PLEASE NOTE:: I only specified the width and not the height. This means it will SCALE the image nicely. Because not all widths and height will be the same.
Hope this helps you and any other peeps out there wanting this functionality.
Graham Vincent.
http://sosoduko.com
graham@thelondongayscene.co.uk
RE: Choosing pictures after upload
Maybe good idea would be implementing something like phpThumb, to create real really small thumbnails, and cache them..
Just an idea
RE: Choosing pictures after upload
I think I will try to do this as it will kane the bandwidth otherwise. Ill let you know when I've done it. I am having trouble with the upload manager already.
I dont seem to be able to tell the upload manager to put ALL uploaded file into the deafult folder or /userfiles/'username'/ where 'username' = the current users username. I can see in the code very clearly but its just not working.
Anyway, good luck for now. Didn't think anyone would reply, these forums dont seem to be moderated.
RE: Choosing pictures after upload
or just use an existing file-browser plugin, like KFM (http://kfm.verens.com/) or the LFO browser which Saul11 works on (http://fckplugins.saulmade.nl/).
Kae
RE: Choosing pictures after upload
I would just generate the resized thumbnails on demand. As long as there aren't 100s of files to generate, you shouldn't overtax your server.
-- T
RE: Choosing pictures after upload
Just remebered ImageMagick would resize them nicely while users are looking throught the image browser. ImageMagic can be used with any language and any operating system....nearly..
http://www.imagemagick.org