dotProject Forums
Google
 

Go Back   dotProject Forums > NEW MODULES AND PATCHES > New Patch Announcements
Register FAQTop Posters Members List Calendar Search Today's Posts Resend Activation Email Mark Forums Read
dotProject Documentation dotProject FAQ Bugs & Feature Requests Language Packs & Themes Download dotProject

New Patch Announcements Please place announcements of new patches here. For support on patches, please go to the General Forums

Reply
 
Thread Tools Display Modes
  #1  
Old 15-11-06, 09:09 AM
oniTony's Avatar
oniTony oniTony is offline
Valued Users
Utter Fanatic
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 01-09-06
Posts: 225
Default File Icons



I thought this looked really good, so I've decided to share. Patch's page is taking refuge on my blog.

direct download link
__________________
dotProject 2.0.4 fork; SunOS; Apache/2.2.3; PHP/4.4.2; Oracle/10g;
Tony's Blog on [URL="http://compsci.ca/blog"]Computer Science and Programming[/URL] and another on [URL="http://compsci.ca/tech"]Technology and Robots[/URL]
Reply With Quote
  #2  
Old 15-11-06, 09:32 AM
Karen's Avatar
Karen Karen is offline
Administrator
Utter Fanatic
dotProject Version: 2.1.3
php Version: 5.2
MySQL Version: 5.2
Operating System Version: Linux
Browser: Firefox
 
Join Date: 13-04-04
Posts: 2,330
Default Re: File Icons

Quote:
Originally Posted by oniTony
I thought this looked really good, so I've decided to share.
They do indeed look good - if you've got the time could you post a feature request on http://bugs.dotproject.net as I'm sure one of the devs would be happy to consider them for inclusion - and we frequently miss things that are on the forums in all the traffic here. (We're always on the lookout for better icons).

Karen C
__________________
I love deadlines. I like the whooshing sound they make as they fly by. Douglas Adams

Please do not use Private Messages to ask support questions.
------
IMPORTANT - READ THIS PLEASE: http://forums.dotproject.net/showthread.php?p=35045
dotProject Admin & Development Blog - http://blogs.sakienvirotech.com/dotProject
DOCUMENTATION SITE - http://docs.dotproject.net
Like Crime Fiction - http://www.austcrimefiction.org
Reply With Quote
  #3  
Old 15-11-06, 01:59 PM
MacOfTheEast's Avatar
MacOfTheEast MacOfTheEast is offline
On Moderation
Utter Fanatic
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 28-09-05
Posts: 1,322
Default Re: File Icons

Looks good, Tony. Thanks (again) for your contribution to the project. You've been a real big help since you've been here!

MOTE

Reply With Quote
  #4  
Old 16-11-06, 12:35 AM
oniTony's Avatar
oniTony oniTony is offline
Valued Users
Utter Fanatic
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 01-09-06
Posts: 225
Default Re: File Icons

Karen, Mote - thank you for the replies

I've reposted this on Mantis as suggested.
__________________
dotProject 2.0.4 fork; SunOS; Apache/2.2.3; PHP/4.4.2; Oracle/10g;
Tony's Blog on [URL="http://compsci.ca/blog"]Computer Science and Programming[/URL] and another on [URL="http://compsci.ca/tech"]Technology and Robots[/URL]
Reply With Quote
  #5  
Old 17-11-06, 01:13 PM
caseydk's Avatar
caseydk caseydk is offline
Valued Users
Utter Fanatic
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 15-04-04
Posts: 1,881
Default Re: File Icons

Doh, I was about to commit some file icons too.

Reply With Quote
  #6  
Old 18-11-06, 01:47 AM
pedroa's Avatar
pedroa pedroa is offline
Valued Users
Utter Fanatic
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 18-01-05
Posts: 3,554
Default Re: File Icons

Quote:
Originally Posted by oniTony
I thought this looked really good, so I've decided to share.
Thanks for sharing.

Would you mind if I'd do it with Vista Inspirate instead?
(http://www.gnome-look.org/content/sh...?content=28352)

Again thanks,

Pedro A.
__________________
Peace!!!
Reply With Quote
  #7  
Old 18-11-06, 02:51 AM
oniTony's Avatar
oniTony oniTony is offline
Valued Users
Utter Fanatic
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 01-09-06
Posts: 225
Default Re: File Icons

Well Vista Inspirate just extends nuoveXT, where all the MIME type icons come from.

It's pretty awesome how they have an icon for just about every recognized MIME type, but the problem is that the icons were designed for much larger size (128x128) and the scaled down versions (required for this application) look pretty bad (blured, missing detail, etc).
__________________
dotProject 2.0.4 fork; SunOS; Apache/2.2.3; PHP/4.4.2; Oracle/10g;
Tony's Blog on [URL="http://compsci.ca/blog"]Computer Science and Programming[/URL] and another on [URL="http://compsci.ca/tech"]Technology and Robots[/URL]
Reply With Quote
  #8  
Old 18-11-06, 12:22 PM
MacOfTheEast's Avatar
MacOfTheEast MacOfTheEast is offline
On Moderation
Utter Fanatic
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 28-09-05
Posts: 1,322
Default Re: File Icons

Quote:
Originally Posted by oniTony
[IMG]I thought this looked really good, so I've decided to share.
Since your little mod only effects newly uploaded files, it probably wouldn't hurt too much to run this sql (as an example) against the database:

update `dotproject`.`files` set `file_icon`='icons/x-office-document.png' where `file_name`LIKE '%doc%';
update `dotproject`.`files` set `file_icon`='icons/x-office-presentation.png' where `file_name`LIKE '%ppt%';
update `dotproject`.`files` set `file_icon`='icons/x-office-spreadsheet.png' where `file_name`LIKE '%xls%';
update `dotproject`.`files` set `file_icon`='icons/x-office-document.png' where `file_name`LIKE '%pdf%';
update `dotproject`.`files` set `file_icon`='icons/image-x-generic.png' where `file_name`LIKE '%png%';
update `dotproject`.`files` set 'file_icon`='icons/application-x-executable.png' where `file_name`LIKE '%zip%' ;

Too bad there's not a specific icon for pdf's

MOTE

Reply With Quote
  #9  
Old 18-11-06, 04:19 PM
oniTony's Avatar
oniTony oniTony is offline
Valued Users
Utter Fanatic
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 01-09-06
Posts: 225
Default Re: File Icons

good call on the update SQL. Actually I would also run

update `dotproject`.`files` set `file_icon`='icons/image-x-generic.png' where `file_icon` = NULL

so that any file that doesn't get covered by any of the LIKE %% statements (say one really odd extension) will end up with a generic icon.

There was no PDF specific icon I would have put that in otherwise.
__________________
dotProject 2.0.4 fork; SunOS; Apache/2.2.3; PHP/4.4.2; Oracle/10g;
Tony's Blog on [URL="http://compsci.ca/blog"]Computer Science and Programming[/URL] and another on [URL="http://compsci.ca/tech"]Technology and Robots[/URL]
Reply With Quote
  #10  
Old 18-11-06, 09:34 PM
MacOfTheEast's Avatar
MacOfTheEast MacOfTheEast is offline
On Moderation
Utter Fanatic
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 28-09-05
Posts: 1,322
Default Re: File Icons

Quote:
Originally Posted by oniTony
There was no PDF specific icon I would have put that in otherwise.
I found a usable pdf icon at the site that Pedroa suggested...

http://www.gnome-look.org/content/sh...?content=28352 within the "Vista-Inspirate 1.0 (KDE)" set under 22x22/mimetypes/pdf.png. I then added a few lines to your code from index_table.php to make it look like this (to kinda cheat the system a bit)

Code:
<?php
		if ($file_row['file_type'] == "application/pdf") {
		echo "<img src=\"images/icons/pdf.png\" />";
		}
		else {
		$file_icon = $file_row['file_icon'];
		echo "<img src=\"images/$file_icon\" />";
		}
		?>
MOTE

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +10. The time now is 12:50 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.