Closed (fixed)
Project:
ImageCache
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Jan 2008 at 21:43 UTC
Updated:
29 Apr 2008 at 15:22 UTC
I have a slideshow module that was using imagecache to ensure images were of specific height and width.
One problem I ran into was when making my module portable to another site, I was relying on a certain preset name to exist, so since module_exists() only got me half way to deciding if an image already had an existing preset to use, I added this little helper method to boolean check for a preset name.
Attached is the patch. I patched it to the DRUPAL-5 branch. Hope that was right.
| Comment | File | Size | Author |
|---|---|---|---|
| imagecache-add-preset-check.patch | 834 bytes | emackn |
Comments
Comment #1
emackn commentedoh.. forgot an example of how I was going to use this.
Comment #2
dopry commentedThis has been added to 2.x.. you can do if (imagecache_preset_by_name($presetname)) {} The load functions are also exists functions. The same may be true of 1.x I'm just not gonna dig into it.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.