I am looking for a post that explain how to use diferent user pics with the imagecache module. A diferent size for content type and for node/teaser. I cant found it. Anybody can help me? Thanks.

Comments

bwv’s picture

The sort answer is that you have to create two presets. You give them a name, and you specify the size of the image for each.
----------------------------------------------------------------------
http://www.bwv810.com/

I am a writer and researcher. In my spare time I build websites with Drupal.
Je peux communiquer en français. / Я могу связывать на русском языке.

xman’s picture

I have created the two presets yet but...How can I modify the templates for show preset 48x48 or preset 32x32 for diferents node types?

72dpi’s picture

heya,

Don't know if this helps you,
But Why not use CSS to do this?
After all, if your user image is already cached, then CSS can do a lovely job at resizing them.

Take this example:

I have a custom user interface page.

I created a background image for my userpic also:

.picture {
	background: url(images/userpic_bg.png) left top no-repeat;
	float: right;
    clear: right;
	width: 86px;
	height: 86px;
	padding: 5px;
	}

Now, When someone writes in the comments box, I want a smaller one, so I use some more css to make it smaller:

#profileBuddylist li{float:left; width:100px;margin-right:10px;text-align: center;}
#profileBuddylist img,#profileGuestbook img, .pictureSmall img {width:36px; height:36px;}
#profileBuddylist .picture,#profileGuestbook .picture, .pictureSmall {
	background: url(images/userpic_bg_small.png) left top no-repeat;
	float: right;
    clear: right;
	width: 36px;
	height: 36px;
	padding: 5px;
	}

Note, that your DIV's need to be named to accommodate the images.

I found this method very useful, and very fast. That way, you are only ever working with one image. if the user updates, no worries.

Hope this gives you some "food for thought", and you may find it useful...

lias’s picture

thanks for the tips

xman’s picture

Thanks, finally I used the imagecache module.