dotProject is an open source project management software that I’ve had a chance to work with a lot lately. I’ve gotten to be pretty active on the forums, but this is my first packaged open source contribution.
I wanted to easily distinguish between various uploaded files, and loading assosiated icons seemed like a neat trick. The preview is on the left. The icons are taken from the Tango Desktop Project – free and open sourced.
Upon upload, PHP determines file’s MIME type and picks the most appropriate icon. As of this version, 0.4, most of the common generic types are supported (application, audio, image, text, video). Microsoft’s Word, Powerpoint and Excel extensions are recognized as Document, Presentation and Spreadsheet document types. Additionally PDF, archives(ZIP, TAR, TAR.GZ), and web media (HTML, XML) extensions spot unique icons. PostScript files (such as Adobe’s Illustrator and Photoshop) are marked with an image icon.
I would like to thank the dotProject developers for comments, suggestions, feedback and support. Especially MacOfTheEast for all his contributions, and suggesting new type definitions.
It is assumed that the user has a clean 2.0.4 stable install.
Download .tar package and follow instructions in readme.txt. Just a few quick changes. Files affected:
- added text/html, /xml, application/x-tar, /x-gzip, /postscript support
- added application/zip support
- no longer relies on file_category (it’s a configurable lookup)
- new generic image (paper-clip)
- include PDF specific MIME type
- recognition of PDF MIME type
- bugfix: file_category was never considered in default fallback
- ADD/UPDATE files table
- SQL to update existing file records to include icons