named and themed icons

ray007 - April 23, 2007 - 11:52
Project:Drupal
Version:7.x-dev
Component:base system
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

I had the idea that managing icons is something that's missing in the drupal core, so modules don't all have to bring along their own version of icons, and we could get a nicer and more uniform look of the drupal admin side.
I've started a little module at http://drupal.org/project/icontheme to initiate discussion on the topic, but so far it seems I'm (almost) the only one thinking about this.

Since I believe for this to be really useful, it needs to land in core (and maybe be a contrib module for Drupal 5), I really need some feedback on
- do we want/need something like this
- what should the api look like

If the conclusion is "we don't want/need it" I'll shut the module down.
If we come to "yes, would be nice for the next version of Drupal", I'd really appreciate help with the api so I'm not writing function nobody wants to use and forget the ones everybody else thinks we should have ;-)

Thanks
Ray

#1

Susurrus - July 6, 2008 - 16:03
Version:6.x-dev» 7.x-dev

Feature requests go against HEAD.

A big +1 to this feature. There should be a nice standard way to define an icon that can be used anywhere and then to be able to override any existing icons, whether in core or contrib. I think a core patch would get a lot of attention if one was created for this issue.

A solution to this would help mediate issues such as #23506: Make throbber recolorable by color.module.

#2

Susurrus - August 22, 2008 - 18:47

This would also help with forum icons as well as the new 6.x-2.x branch of the Filebrowser module. I can definitely at least see an icon API would be used by modules. It would allow modules to declare a namespace (basically a prefix/suffix for naming files or a specific folder) that their icons would be contained in and then Drupal would have a single codebase to check for overridden icons and use those if needed. These should probably go in an icons/ directory within the theme and within each module for the default icons. Within the icons directory the namespace would be used to find overridden icons. Now the question becomes, where does an API like this belong? Should it exist in file.inc or system.module or where?

 
 

Drupal is a registered trademark of Dries Buytaert.