Forums

User Photo
Dimensions (6 posts)

  1. jacobdubail
    Member
    Posted 8 months ago #

    How can I control the default sizes for these images?

    Thanks,
    J

    http://wordpress.org/extend/plugins/user-photo/

  2. kazary
    Member
    Posted 8 months ago #

    Same question. I wonder how to control the width and height when I put the <? php userphoto_the_author_photo() ()?>

  3. kazary
    Member
    Posted 8 months ago #

    Someone?

  4. jay76
    Member
    Posted 5 months ago #

    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.

  5. jay76
    Member
    Posted 4 months ago #

    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.

  6. C1pr1an
    Member
    Posted 4 months ago #

    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!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags