ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Display avatars in comments

January 22, 2010 9:03am

Subscribe [6]
  • #1 / Jan 22, 2010 9:03am

    mrpiano

    85 posts

    Howdy,

    I’m trying to display a member’s avatar in the comments area of my site.  It sounds, however, like the avatar tags need to be within a weblog tag, (please confirm), which is not the case…so my question would be how to do this, as my understanding is that I can’t put a weblog tag nested in the middle of comments tags…anyway, here’s the code I’m trying to use:

    {exp:comment:entries sort="asc" limit="20"}
                    <ol class="commentlist">
                    
                        <li class="comment">
                            <div class="comment-body">
                                <div class="commentmetadata">
                                    <a href="#">{comment_date format="%Y %m %d"}</a>
                                </div>
                                  <div class="vcard">
    
    
    {if avatar}
                                 {avatar_url}
    {/if}
    
    
    
                                     
                                        comment by <cite class="fn"><a href="http://{member_profile_link}class=url">{name}</a></cite>
                                    
                                </div>
                                
                                {comment}
                                
                                <div class="reply">
                                     <a href="#" class="comment-reply-link">Reply to this comment</a>
                                </div>
                             </div>
                        </li>
    
    {/exp:comment:entries}

    As an aside, member_profile_link also doesn’t seem to be returning anything back.  It just outputs the URL of the blog post.

    Thanks,
    GG

  • #2 / Jan 22, 2010 10:32am

    Ingmar

    29245 posts

    It sounds, however, like the avatar tags need to be within a weblog tag, (please confirm)

    It’s available in the Comment module as well, take a look.

  • #3 / Jan 22, 2010 11:20am

    mrpiano

    85 posts

    Hi Ingmar,

    So, that would imply that my avatar should be showing up in my comments.  If you look at my code example above, I have exactly the code that you pointed me to.  The issue is that my avatar isn’t showing up, even when I’m logged in.

    Any thoughts on why that might be happening?

  • #4 / Jan 22, 2010 3:56pm

    Sue Crocker

    26054 posts

    mrpiano, I haven’t tested this yet, but the avatar is for the *author* of the entry.

    But let me doublecheck—I used to use the Gravetar plugin for comments.

  • #5 / Jan 22, 2010 3:58pm

    mrpiano

    85 posts

    Hi Sue,

    I am, in this case, both the author of the entry and the commenter on the entry…not sure if that helps or not, but thought I would let you know.

  • #6 / Jan 22, 2010 7:49pm

    Adam Dorsey

    1439 posts

    Is the avatar image showing up for the author of the entry? I understand it is not showing up for the commenter.

    Also, this similar thread
    may be of some use. Thanks!

  • #7 / Jan 22, 2010 9:24pm

    mrpiano

    85 posts

    Hey Adam,

    So, I only have the tag in the comments section, so I’m not trying to pull it for the author, but only for the commenter.  In this case, I’m both 😊

  • #8 / Jan 23, 2010 3:37pm

    Greg Salt

    3988 posts

    Hi mrpiano,

    Did you check the settings at My Account > Edit Preferences (the resolution John posted in the thread that Adam linked to)?

    Cheers

    Greg

  • #9 / Jan 24, 2010 9:33pm

    mrpiano

    85 posts

    Hey Greg.

    Got this worked out through a series of code tweeks.  Thank you!

    GG

  • #10 / Jan 25, 2010 5:55am

    John Henry Donovan

    12339 posts

    Glad you are up and running again. Feel free to start a new thread if you have nay more questions.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases