WordPress.org

Support

Support » Plugins and Hacks » User photo : unable to display default image

User photo : unable to display default image

  • Hi ! I have a problem with the User Photo plugin, and I’m sure it must be quite silly, but I can’t figure it out.
    I want to specify a defaut image if no image is specified in the user’s profile.
    I’m trying the synthax provided in the plugin explanation :
    userphoto_the_author_photo($before, $after, $attributes, $default_src)

    userphoto_the_author_photo('','','','http://www.domain.com/dummyimage.jpg');

    I can’t get anything to appear. What am I doing wrong ? The rest of the plugin works perfectly for me. (of course, I’m trying it with an url pointing to a real image)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Oh, drop it, I found out by myself. Maybe it will be useful for other people. Actually, the default_src is not a “hard-coded url” (sorry for my english), but is a relative path to the uploaded/user-photo directory. So let’s say you have a picture named “other.jpg” in this directory, your default_src would be ‘other.jpg’
    BTW, apparently, a user needs to be registered to have a default image. It doesn’t work with simple visitors who are not registered in the users database.
    (correct me if I’m wrong)

    What I was trying to do was display a default image for the visitors. Any way to do that ?

    Thanks for all suggestions !

    I’m interested in this as well. Showing a default image for any guests that comment and are not logged in.

    I’ve got the comment_author_thumb in the comments.php and wondered if there was an if then statement written to display a default 80×80 image if the user is not logged in …

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘User photo : unable to display default image’ is closed to new replies.
Skip to toolbar