Display Imagecache Authors, not Users

Status: 
Open
Question: 

Hi,

I have a problem with imagecache user pictures being displayed, rather than the authors picture. For example, I have created a imagecache preset called 'comment' and on a particular page I want it to display the authors imagecache preset, but it displays the logged in user's picture for all posts, instead of the picture of the post author. Here is the code I am using:


<?php print $image = l(theme('imagecache', 'comment', $user->picture), 'user/' . $user->uid, array('html' => TRUE));?>

I sincerely appreciate any assistance anyone can provide.

Many thanks,

Shane.

Responses

1. It Works!

Hi

I got it to work, using code the following code:


<?php print $image = l(theme('imagecache', 'comment', $message->actor->picture), 'user/' . $message->actor->uid, array('html' => TRUE));?>

This code uses the imagecache preset 'comment' to display the actors user picture next to their message', rather than the logged in user picture next to all messages. Took me 2 days to find it!

Many thanks,

Shane.