exlude some paths from sprite generation
moshe weitzman - April 7, 2008 - 02:41
| Project: | CSS Sprite Generator |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
i'd like to exlude some paths from the sprite system. a module that is nicely configurable based on paths is http://drupal.org/project/sf_cache. you might borrow some ideas from there

#1
I do have a hook at the moment which allows for excluding paths in regards to which images are compiled into sprite collections if thats what you referring to ( I forget what the hook is ) but many of my hooks/defaults will be settings ideally, I think what you mentioned is on my todo list
#2
Never mind, right now I have the following hook, as you can imagine we already have some sprites, animated gifs, etc that should not be part of a sprite collection, I will be implementing the path based solution as well
/**
* Implementation of hook_sprites_images_ignore();
*/
function sprites_sprites_images_ignore() {
return array(
'./modules/color/images/lock.png',
'./modules/color/images/hook.png',
'./misc/farbtastic/marker.png',
'./misc/farbtastic/mask.png',
'./misc/farbtastic/wheel.png',
'./misc/powered-black-135x42.png',
'./misc/powered-black-80x15.png',
'./misc/powered-black-88x31.png',
'./misc/powered-blue-135x42.png',
'./misc/powered-blue-80x15.png',
'./misc/powered-blue-88x31.png',
'./misc/powered-gray-135x42.png',
'./misc/powered-gray-80x15.png',
'./misc/powered-gray-88x31.png',
'./misc/throbber.gif',
'./misc/progress.gif',
'./misc/druplicon.png',
);
}
#3
I committed some of the changes, they should be available shortly. Hopefully I will have time to finish this off, we just got a few new clients today so I'm pretty swamped.
Where it would really get more complicated is rewriting the CSS taking the box model and parent selectors into account, personally I think that would just be a big unreliable mess but I have not really sat down to think about the approach much yet.
#4
Thanks. I think there is a place for whitelist based images as well as blacklist.
But maybe ditch all auto-crawl of directories and move to a directive aproach as proposed at http://drupal.org/node/245602