/ Published in: PHP
have multiple imagecache files be recognized as default
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function icye_site_imagecache_default_presets(){ $path = drupal_get_path('module', 'icye_site') . '/imagecache'; $files = drupal_system_listing('.inc$', $path, 'name', 0); foreach ($files as $file) { include_once $file->filename; } return $presets; } 'presetname' => 'site_logo', 'actions' => array ( 0 => array ( 'weight' => '0', 'module' => 'imagecache', 'action' => 'imagecache_scale_and_crop', 'data' => array ( 'width' => '12%', 'height' => '12%', ), ), ), );