Reply to comment

Big first update

I did the first commit of code a few days ago. It contains everything I've been working on up untill now (except some experimentational code that I'm not sure belong in the repos). To sum it up, it can now do this:

  • Discover icon sets in different locations
  • Read their info files
  • Display a list of available icon sets with name, screenshot and description
  • Save icon sets and their states in the "system" table, allowing users to enable/disable them

Icon sets are looked for in the following locations:

  • /icons/*/
  • /modules/*/icons/
  • /profiles/*/icons/*/
  • /sites/*/icons/*/
  • /sites/*/modules/*/icons/
  • /sites/*/themes/*/icons/
  • /themes/*/icons/

The themes and modules directories are different from the others, in that their icons directory contains the set of icons for that particular theme or module, while the other locations are places where multiple generic icon sets may live. Maybe this is confusing?

Anyway, this is a snapshot of the admin/build/icons page at this point:
209827

The icon sets you see there are all for testing purposes. Download a zip file of the demo icon sets (at the bottom) if you want to try out the module, or you'd see little in admin/build/icons (yet).

Other things I've been doing since the project started:

  • Unfortunatey been busy with too many things at once, making it hard to get into this project. I apologise this and want to make up for the time lost during the rest of the project.
  • Seen how other projects have dealt with icons, mainly Joomla and Plone as they are our closest neighbours, but also some smaller systems (without any luck). Joomla and Plone use img tags, and don't support something like icon sets. Plone used CSS files for a while, but switched back to img tags.
  • Read a lot of code in core, mainly the theme and module parts, as well as color.module
  • Tried out some ways to rewrite CSS files, as this is what was bugging me the most - how to allow themers to easily position icons in their themes, while allowing users to select icons from different sets, and have it all work with Drupal's optimalization and caching mechanisms + color.module
  • Discussed some aspects of the project with yoroy and alpritt on IRC
  • Started thinking about a naming scheme for icons. I've found Freedesktop's Icon Naming Specification very useful, especially since it is what many existing icon themes for Linux desktops use.

As this is the first code you see from me, I hope to hear what you think of it so far - the good and the bad. It should be mentioned that functions that are based on existing core functions are marked with a @see Javadoc property. I expect to clean up these functions and make them more consise and icon.module specific. The local tasks aren't ideal either. I think "List | Configure", with themes as sub-tasks for Configure, would be better.

I'll go ahead and create some issues in the project's queue right now, and hope to be able to spend much more time on this in the time to come. I also promise to commit more often, and update this blog as soon as I have something to share :)

AttachmentSize
Demo icon sets32.48 KB

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <abbr> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h2> <h3> <h4> <h5> <h6>
  • Lines and paragraphs break automatically.

More information about formatting options