Closed (fixed)
Project:
Marinelli
Version:
7.x-3.0-beta9
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Apr 2011 at 16:59 UTC
Updated:
3 May 2011 at 20:31 UTC
Enabling the avatars in the comments page is not displayed correctly.
The bug is in managing the size of the avatars in marinelli_preprocess_comment().
A partial fix of this problem is this:
function marinelli_preprocess_comment(&$vars) {
$vars['classes_array'][] = $vars['zebra'];
$user_image = array('width' => 0);
if (isset($vars['user']->picture)) {
// No.. I don't use style
if(!variable_get('user_picture_style')){
$size = variable_get('user_picture_dimensions');
$size = explode('x',$size);
$user_image['width'] = $size[0];
}
else{
//Yes... I use style and it this code not works
if ($picture = file_load($vars['user']->picture)) {
$user_image = image_get_info(image_style_path(variable_get('user_picture_style'), $picture->uri)); //always NULL
}
}
}
$vars['image_width'] = $user_image['width'] + 25;
}
Comments
Comment #1
Lioz commentedHi Uccio (ciao! ;))
i've already posted a possible solution in this similar issue
http://drupal.org/node/1059664
does it work?
Comment #2
Paulbg commentedMarinelli 7.x-3.0-beta9
Bug fix works on: IE8 (XP) Firefox 4.0 (XP, Ubuntu) Chrome(Ubuntu) haven't tried other browsers/OS
Comment #3
uccio commentedHi Lioz,
The problem of this function is that there are 2 possibilities of configuration: Plain image or images with styles.
My patch fix NO styles configuration (my actual configuration) and the http://drupal.org/node/1059664 fix the "STYLES" configuration.
The solution is to Merge the two patch
Comment #4
Lioz commentedpushed in the next release, thanks Uccio!