Posted By

karmacode on 09/27/10


Tagged

drupal imagecache


Versions (?)

imagecache default presets


 / Published in: PHP
 

have multiple imagecache files be recognized as default

  1. function icye_site_imagecache_default_presets(){
  2. $presets = array();
  3. $path = drupal_get_path('module', 'icye_site') . '/imagecache';
  4. $files = drupal_system_listing('.inc$', $path, 'name', 0);
  5. foreach ($files as $file) {
  6. include_once $file->filename;
  7. }
  8. return $presets;
  9. }
  10.  
  11.  
  12. $presets['site_logo'] = array (
  13. 'presetname' => 'site_logo',
  14. 'actions' =>
  15. 0 =>
  16. 'weight' => '0',
  17. 'module' => 'imagecache',
  18. 'action' => 'imagecache_scale_and_crop',
  19. 'data' =>
  20. 'width' => '12%',
  21. 'height' => '12%',
  22. ),
  23. ),
  24. ),
  25. );

Report this snippet  

You need to login to post a comment.