I would like to have the user picture (small size) displayed in my theme by default on every page. If the user does not have a user picture yet then the default picture (small size) should be used. Same for the case if a user does not have an account yet.

Are there any theming functions provided by this module? Or how can I achieve this?

Comments

jaochoo’s picture

I am using the following line:

<?php echo theme("imagecache", "user_image_default", $user->picture); ?>

That works fine if the user has a picture, but it does not display the default picture for a user without a picture set. I used a different function before (I think it was one from the ImagecacheProfile module) which worked fine, but when being on the My Account page, it displayed the large size picture in my theme even though it was supposed to show the small size picture.

Any support on how to use it in my theme correctly would be appreciated!

andypost’s picture

Status: Active » Fixed

You should read docs first, this module used to override default behavior of theming user pictures. Custom theming is out of this module.

jaochoo’s picture

Component: Code » Documentation
Status: Fixed » Needs review

Could you please point me to the documentation? http://drupal.org/node/364511 does not include any hint how I can use it in my theme.. I want to display the small-size user picture of the currently logged-in user in the header of my page. E.g. (pseudo-code):

if ($logged_in && $has_picture){
  echo "Hello " . $user->name;
  echo $user->small-profile-picture;
} else {
  echo $small-default-picture;
}
andypost’s picture

Project: ImageCache Profiles » ImageCache
Version: 6.x-1.2 » 6.x-2.x-dev

@jaochoo ImageCache Profiles module does not provide any theming functions!
Use Imagecache docs about using their API to print a $user->picture

jaochoo’s picture

You write that it is overriding default theming behaviour. However, in OG for example, instead of displaying small user pictures the "Recent Member" box or "Faces" listing shows the full size uploaded picture (not even the user_picture_large imagecache profile es defined to be used by ICP)..

fizk’s picture

Status: Needs review » Closed (fixed)

Please reopen if this is still an issue with ImageCache 6.x-2.0-rc1.