WordPress.org

Support

Support » Plugins and Hacks » User Photo » [Plugin: User Photo] Dimensions

[Plugin: User Photo] Dimensions

Viewing 6 replies - 1 through 6 (of 6 total)
  • Same question. I wonder how to control the width and height when I put the <? php userphoto_the_author_photo() ()?>

    Someone?

    userphoto_the_author_photo(”, ”, array(width => ‘220’, height => ‘100%’));

    This will give you an image 220px wide, and whatever height is required to keep the image ratio.

    Of course, you can set both values to whatever you want.

    Actually, I had to change my code to the following:

    userphoto_the_author_photo(”, ”, array(width => ‘220’, height => ‘auto’));

    The ‘auto’ value is invalid, but it seems to do what I want.

    Replace from “user-photo.php” line 112:
    $img = userphoto__get_userphoto($userid, (abs($full_dimension - $size) < abs($small_dimension - $size)) ? USERPHOTO_FULL_SIZE : USERPHOTO_THUMBNAIL_SIZE, '', '', array(), '');
    with:
    $img = userphoto__get_userphoto($userid, (abs($full_dimension - $size) < abs($small_dimension - $size)) ? USERPHOTO_FULL_SIZE : USERPHOTO_THUMBNAIL_SIZE, '', '', array(width => $size, height => '100%'), '');

    that will rezolve all problem with size.
    For autor: pls. consider that on next update!

    Hoping to bump this up. I replaced the code suggested by C1pr1an and it works find in Firefox but in Chrome and IE and, I believe, Safari, the image is stretched. The image, itself, is sized correctly

    Any ideas???

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: User Photo] Dimensions’ is closed to new replies.
Skip to toolbar