Support » Fixing WordPress » User Photo Plugin

  • I have successfuly installed User Photo plugin by weston ruter. When attempting to upload a photo from a file on my hard disk in the user management screen I receive the following message:

    Upload error: The userphoto upload content directory does not exist and could not be created. Please ensure that you have write permissions for the /wp-content/uploads/ directory.

    The readme instructions are a bit obtuse for me:
    == Description ==

    Allows a user to associate a profile photo with their account through their “Your Profile” page. Admins may
    add a user profile photo by accessing the “Edit User” page. Uploaded images are resized to fit the dimensions specified
    on the options page; a thumbnail image correspondingly is also generated.
    User photos may be displayed within a post or a comment to
    help identify the author. New template tags introduced are:

    * userphoto_the_author_photo()
    * userphoto_the_author_thumbnail()
    * userphoto_comment_author_photo()
    * userphoto_comment_author_thumbnail()

    The first two should be placed in the posts loop near the_author(), and the second two in the comments
    loop near comment_author() (or their respective equivalents). Furthermore, userphoto_the_author_photo()
    and userphoto_the_author_thumbnail() may be called anywhere (i.e. sidebar) if $authordata is set.

    The output of these template tags may be modified by passing four parameters: $before, $after,
    $attributes, and $default_src, as in: userphoto_the_author_photo($before, $after, $attributes, $default_src).
    If the user photo exists (or $default_src is supplied), then the text provided in the $before and $after parameters is respectively
    prefixed and suffixed to the generated img tag (a common pattern in WordPress). If attributes are provided in the $attributes
    parameter, then they are returned as attributes of the generated img element. For example: userphoto_the_author_photo('', '', array(style => 'border:0'))

    Uploaded images may be moderated by administrators via the “Edit User” page.

    I don’t know if I need to edit files in the theme editor or if I need to place the photo files on the server somewhere.

    Any help would be appreciated.


Viewing 4 replies - 1 through 4 (of 4 total)
  • I’ve sort of got this working. Once I installed the plug-in and activated it, I went to the “Your Profile” page for each of my users and added their photos. That takes care of getting the files on to the server. I then edited my theme’s index.php file by adding


    immediately after

    <div class="entry">

    and that did the trick.

    The problem I’m having is getting the text of each post to wrap around the picture. I think I know the CSS code to do it but the problem is that I don’t know how to define the class for the image. I know next to nothing about PHP and CSS so I hope I’ve explained that right. Could anyone help out with this?

    It doesn’t take php, I believe…
    you need to create a file in your wp-content directory named “uploads”, and then a file in that called “directory” and you need to modify it’s permissions to allow writing permission to users. You can do all that with an FTP server.
    That, at least, is the answer to the error you have.

    neil — i’ve been trying for a fews weeks now and i still can’t figure what’s wrong.

    i tried using your <?userphoto_the_author_thumbnail()?> after the <div class="entry"> however the theme i’m using doesn’t have <div class="entry"> it has <div class="entry hentry">.

    i’m using the Tarski theme.

    needless to say, i’ve just been pasting you line of code everywhere in hopes that i get lucky, still haven’t had any. i’m not the best and PHP so any noob help is awesome 🙂


    I found that I was able to get it to display nicely thus:

    In my theme’s home.php (the file from which I am calling the image) I have simply (with no line-specific div tags):

    <?php userphoto_thumbnail($authordata); ?>

    In my theme’s style.css I found this bit that is relevant to what I am working on, though it took a while for me to track it down:

    .hpnewtop img {
    	border: none;
    	margin: 0px;

    I changed it, adding a float statement to wrap the text, and a margin statement to put some spaces between images and text:

    .hpnewtop img {
    	border: none;
            float: left;
            margin: 4px;

    And it seems to be doing quite nicely.


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