Closed (fixed)
Project:
ImageCache Profiles
Version:
5.x-1.4
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Apr 2008 at 20:17 UTC
Updated:
8 Mar 2010 at 17:10 UTC
I want all user avatars to default to 100x100 when I havent declared them to be any other size. I also want the profile picture to be 200x200. I was able to set this up perfectly using the settings provided in the module.
The problem is when I wish to display an avatar in a block on another page, I tried using the following php code but it still shows the image at the default 100x100 size. What can I do?
theme('user_picture', $user, 'avatar-l')
Comments
Comment #1
v1nce commentedCall
theme('imagecache', $ruleset_namespace, $image['filepath'], $alt, $title, $attributes)$ruleset_namespace is an imagecache preset name you have defined.
Comment #2
lelizondo commentedThis is really old, but anyway.
I have a "dashboard" created with panels. one of the blocks shows the user picture of the current user. I have 3 imagecache presets:
1. one for comments: userthumb
2. another one really small: usersmall
3. and another one of the size of my block, this is the big one: user280x
To show the block with the preset I want I'm using this code:
The "if" is just to show a message if the user hasn't uploaded a picture. You can use a default picture or whatever you want.
I'm changing to support request because this is not a bug, and I'm also using the latest version. Haven't tried with 1.3
Luis
Comment #3
andypostTo use default user picture user variable
$picture = variable_get('user_picture_default', '');