Support » Plugins » [Plugin: User Photo] User-Photo in the loop…

  • Has anyone figured out how to pull the user photo into the loop? I’m trying to put a small profile that shows up with each author’s post, which includes, if at all possible, their photo.

    Thanks in advance for you assistance,
    Nathan

Viewing 15 replies - 1 through 15 (of 15 total)
  • This is really not very good here. I am not the worst programmer and the documentation on this is seemingly intended to confuse and frustrate.

    I need quite simple the code to use for my index.php in the theme directory, which is where the loop is. i tried everything I could and it won’t show up.

    Like so many dozens, if not hundreds of people out there, the image shows up fine in the admin but not on the site.

    Please assist with this, Weston. I will make a nice little donation as well, once this thing is actually working.

    Thanks!

    ~doug

    I achieved it this way
    Before the loop

    <?php
    if(get_query_var('author_name')) :
    $curauth = get_userdatabylogin(get_query_var('author_name'));
    else :
    $curauth = get_userdata(get_query_var('author'));
    endif;
    ?>

    In the loop
    <?php userphoto_the_author_photo() ?>

    Webmatter, could you post the full code of your loop, please? I got the author page working but now I try to display the thumbnails in a loop which won’t work of course. I appreciate your help.

    I have a thumbnail of the author next to the headline and the code within the loop looks like this:

    <div class="heading"><a href="<?php the_permalink() ?>" rel="bookmark"> <?php userphoto_the_author_thumbnail() ?></a><h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3></div>

    thumbnail shows up .. no problem here.

    Actually, I got that working. The way I want to use the plugin is to list all the authors with there (thumbnail) photo on a page. Does anyone know how to achieve this?

    What this plugin needs are some detailed docs to help the vast majority of us understand exactly what to place where! One look at the readme file and I was lost!

    Does anyone know how to show a page that has a grid of user photos, with pagination at the bottom to see another group of users? Thanks in advance.

    I know you are saying to put it in the loop but where is the loop located which PHP file? I got it to work for comments http://www.allinjac.com/blog but can not get it to work for authors. Any one have any ideas?

    Hi,

    I have also problem with the loop, I use the theme Atahualpa.
    And in the index.php of it I have put the following code, but nothing changed.

    <?php if (have_posts()) : ?>
    		<?php while (have_posts()) : the_post(); ?>
    <?php
    if(get_query_var('author_name')) :
    $curauth = get_userdatabylogin(get_query_var('author_name'));
    else :
    $curauth = get_userdata(get_query_var('author'));
    endif;
    echo $curauth;
    ?>
     <?php userphoto_the_author_photo() ?>
     <?php userphoto_thumbnail($curauth, $before = '', $after = '', $attributes = array(), $default_src = '') ?>
    			<?php if (is_last_post()) {?>
    				<div class="post-last" id="post-<?php the_ID(); ?>">
    			<?php } else { ?>
    				<div class="post" id="post-<?php the_ID(); ?>">
    			<?php } ?>
    
    <div class="heading"><a href="<?php the_permalink() ?>" rel="bookmark"> <?php userphoto_the_author_thumbnail() ?></a><h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2></div>
    
    				<div style="clear: left;"></div>
    				<div class="entry">

    I think I put in the wrong loop, but I found any other loop. 🙂
    I’ll hope somebody of you can help me.

    thanks
    itchay

    Hi itachy,
    you got the right loop don’t worry … 🙂

    Hust put the first code snippet
    <?php
    if(get_query_var(‘author_name’)) :
    $curauth = get_userdatabylogin(get_query_var(‘author_name’));
    else :
    $curauth = get_userdata(get_query_var(‘author’));
    endif;
    echo $curauth;
    ?>
    before the loop (not in the loop).

    henigushi

    (@henigushi)

    I’m trying to get style values into the img call so I can have an author thumbnail float next to a post. Without userphoto I do this:
    <img style="float:left;margin:0px 5px 10px 0px;" src="<?php bloginfo('template_url'); ?>/images/thumbnail.jpg" alt="Default Thumbnail" />

    I would like to get style="float:left;margin:0px 5px 10px 0px;" into the img code created via <?php userphoto_the_author_thumbnail(); ?> but can’t figure out how to do it (other than hacking the plugin, which I’d prefer not to do).

    I know this is probably simple stuff, but I’m a newbie.

    Thanks!

    Hi!
    I am a simple user. I have a blog, where my friends from our ex school register and write.
    I would like to add there avatar with the Posts, Comments, and, if possible, next to the the list of last Comments ans last Posts.

    Could you, please, give me a simple way to do it?

    If there is a file (or files) to modify… which one(s), and what to put there?

    Thanks a lot,

    Tamas

    Hello,

    I’m very new at this. I uploaded the plugin to my blog and I uploaded a photo for the administrator’s profile. However it doesn’t show up on any of the posts the administrator has made. I’m sure I need to modify my code but I am a loss as to which page to edit and what to put in. Can someone please help?

    Thanks!
    Jackie

    Iam only can show the author photo, but fail to show the comment photo.

    I added the code to my theme php like this:

    ‘For
    comments:
    1. Go to Admin/Design/Theme Editor
    2. Select ‘Comments (comments.php)’
    3. Look for <?php echo get_avatar( $comment, 32 ); ?>
    4. Place the following after the above:
    <?userphoto_comment_author_thumbnail()?>

    For posts (author):
    1. Go to Admin/Design/Theme Editor
    2. Select ‘Single Post (single.php)’
    3. Look for the <div class=”post” .. and then the <h2> title under that. After this, place the following:
    <?userphoto_the_author_thumbnail()?>’

    Iam only can show the author photo, but fail to show the comment photo.

    I discovered, in the other user’s sucessfully case’s, their photo stored path is like that (I right click the author /comment photo to see the path):

    http://mydomain/blog/wp-content/uploads/userphoto/pgrueser06.thumbnail.gif

    but in my case, the path was default as : user photo was stored inside each own blogger dir file ((iam blogger #6) …not in the common uploads file like the above case..so, I cannot go to other user blog.dir file to get their user photo image..

    in my case, userphoto stored in that path:
    http://mydoamin/wp-content/blogs.dir/6/files/userphoto/iamcrazymoon.thumbnail.jpg

    when blogger #5 left comment in my post,
    the comment photo path still point to my blogger #6’s dir…
    that means the system go blogger #6’s file to find blogger #5’s user photo, that why fail to find out..

    how can I change that path? where to change?

    Not sure if this will help but you are missing the php in
    <?userphoto_comment_author_thumbnail()?>

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Plugin: User Photo] User-Photo in the loop…’ is closed to new replies.