Return to Snippet

Revision: 32882
at October 3, 2010 20:59 by screamwork


Initial Code
<pre>    
<?php if ($account->picture) {
        print theme('imagecache', 'profile_pic', $account->picture, $alt, $title, $attributes);
      }
      else {
        print theme('imagecache', 'profile_pic', default_profile_pic.png, $alt, $title, $attributes);
      }
      ?>
</pre>

//or this
function theme_profile($image_path) {
if (!$image_path) {
$image_path = [path_to_default_image]
}
return theme('imagecache', $preset_name, $image_path);
}

Initial URL

                                

Initial Description

                                

Initial Title
Drupal: Imagecache presets in templates

Initial Tags
drupal

Initial Language
PHP