Automatic file type image when uploading files?

Dubber Dan - April 3, 2009 - 18:39
Project:IMCE
Version:6.x-1.2
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I was wondering if it's possible to have a small file type image appear next to the text title of uploaded documents, for example a small pdf logo next to pdfs and a small word logo next to word docs?

#1

ufku - April 11, 2009 - 23:45

Yes but it requires some javascript knowledge. See how imce.thumbRow(js/imce_extras) method changes the file list to add a thumbnail before filenames. It is included as a list hook in tpl/imce-content.tpl.php.

#2

Dubber Dan - April 20, 2009 - 13:08

Ah, well I don't know javascript, so that's me stumped already! Can you give me some more info on what to do?

#3

ufku - April 30, 2009 - 16:43

If you knew javascript you would probably create a function like imce.thumbRow and get the file extension of each file and insert the EXT.png img that you already have on the server.

 
 

Drupal is a registered trademark of Dries Buytaert.