Support » Plugins » User Photo Plugin

  • I’ve tried to use the User Photo plugin at P2 theme but i have a problem:

    As you can see here if a user upload his image and doesn’t use the Gravatar, his post will not be shown properly.

    Can you please tell me what should I do in order to show the image properly if I’m using User Photo plugin?

Viewing 3 replies - 1 through 3 (of 3 total)
  • so what you want is for a manually uploaded photo from a user to get priority over a gravatar image?

    have you tried surfalot’s solution:

    	$the_photo = '';
    	if (function_exists('userphoto__get_userphoto') && defined('USERPHOTO_THUMBNAIL_SIZE') && !empty($comment->user_id))
    		$the_photo = userphoto__get_userphoto($comment->user_id, USERPHOTO_THUMBNAIL_SIZE, /* before */ '', /* after */ '', array('class' => 'avatar'), /* def src */ '');
    	if (!empty($the_photo)) echo $the_photo;
    	else echo get_avatar( $comment, 32 );

    you’ll need to edit functions.php at line 134 in p2 1.1.5.
    this is what you need to replace with above:
    <?php echo get_avatar( $comment, 32 ); ?>

    <b>@Nobble</b> Thx 🙂 I found another plugin, and I think is better than User Photo, it’s called Avatars. It work’s just fine, I don’t need to make any modifications 🙂 But, thx for help!

    I second that, Avatars works really well.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘User Photo Plugin’ is closed to new replies.