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 |
Jump to:
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
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
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
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.