it will be great, if there is a image style setting for user picture.

Comments

SGhosh’s picture

I have just completed porting the module; waiting for a review of the code. So I suppose any new feature will have to wait a bit.
What sort of image styles do you think should be available? I think the image should always be a thumbnail. Any suggestions from you? But please give it in a little detail. :) Adding more features is always great! ^_^

It would be great if you checked out the ported module and reviewed it.(of course if you have time :)). This is the link to the sandbox project (User Visits D7)- http://drupal.org/sandbox/SGhosh/1538982

And please, please report any bugs you find.

funature’s picture

i mean i have different image sizes for user picture(imagecache), maybe you should offer the option let me to choose one:)

funature’s picture

here is my custom theme_user_visits function, i can manually change the image style for the user picture. but i think it is better if you can do something to offer an option in block configuration. and i really want to see the integration with the views module, if you have time.

function theme_user_visits($vars) {
  $account = $vars['account'];
  $timestamp = $vars['timestamp'];
  $referer = $vars['referer'];
  $attributes = array(
          'attributes' => array('title' => t('View user profile.')),
          'html' => TRUE,
        );

  $output  = '<div class="user_visit">'."\n";
  $user_picture = theme('image_style', array('path' =>  $account->picture->uri, 'style_name' => 'activity_avatar'));
  $output .= l($user_picture, "user/$account->uid", $attributes);
  $output .= ' <div class="name">'. theme('username', array('account' => $account)) .'</div>'."\n";
  
  if ($timestamp) {
    $output .= privatemsg_format_date($timestamp);
    $output .= $referer ? ' <div class="referer">'. t('Referer !link', array('!link' => l($referer, $referer))) .'</div>'."\n" : '';
  }
  $output .= '</div>'."\n";
  return $output;
}
SGhosh’s picture

Yeah it definitely should have an option for that + options for whether you want the user image or not. But right now I am awaiting review on the User Visits D7 + I am also a bit busy with some other projects. So it will have to wait for some time. But I'll surely work on adding these extra features whenever I get time :)

I'm still a Drupal noob, so it will take some time for this.

And thanks so much for taking interest. ^_^

funature’s picture

i'm glad to help you testing it, i hope i can do more, but sorry i'm not a coder.

stevenx’s picture

Thans for this patch.
Helped me alot!

If no account picture was added by the user you could add this to deliver a default picture:

 if ($account->picture->uri == ""){
  $account->picture->uri="public://profilepics/default-user.jpg";
  }
sanduhrs’s picture

Issue summary: View changes
Status: Active » Closed (outdated)