WordPress.org

Ready to get started?Download WordPress

Forums

wp-gravatar problem (20 posts)

  1. lamisto
    Member
    Posted 5 years ago #

    I have a very odd problem with my wp-gravatar plugin, when a user comments instead of showing his image in the left side of his name it shows it exactly under the name, how can i change it to appear on the left of his name? i-m using wp 2.5.1 and illacrimo theme thanks.

  2. lamisto
    Member
    Posted 5 years ago #

    anyone?:(

  3. 4k
    Member
    Posted 5 years ago #

    how the pic shows depends on theme, placement of code in comments etc. Various other things you have going on.

    It would be much easier for someone to help you if you included a url

  4. lamisto
    Member
    Posted 5 years ago #

    well where should i do the changes so that the immage will appear in the right place? i have to say that when i activate the plugin the position of the commenters name is also modified so i-m guessing that it has to do with the gravatars.php?

  5. 4k
    Member
    Posted 5 years ago #

    without a url to see exactly what is happening I couldn't tell you.

    However, have you gone to Settings gravatar and changed anything there so it matches your layout?

    Also this plugin has a support forum where they may be able to answer your question, again unless you blog for the CIA a link to see what is going on will help them.

    http://gravatar.bloggs.be/

  6. lamisto
    Member
    Posted 5 years ago #

    ok so i can-t let them stay there forever but i made a print of how it looks like http://danut.profesor.info/gravatar.jpg . Now i want the picture to be on the left side of the name not under it.

  7. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Also, on a side topic, 2.5.1 has built in support for gravatars. You don't need a plugin.

  8. lamisto
    Member
    Posted 5 years ago #

    well without it it doesn`t work, can you tell me how to solve the problem based on that print?

  9. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    You just need to edit your theme and put the call to the gravatar functions in the right place, then edit your CSS to make them show up where you want.

    Without looking at your comments.php file, I can't tell you what edits to make. Do you have a link to a copy of your theme?

  10. lamisto
    Member
    Posted 5 years ago #

  11. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    In the comments.php file, you'll find this code:

    <?php if (function_exists('gravatar')) { ?>
     <span class="ListGrav">
     <img src="<?php gravatar("R", 25); ?>" alt="<?php comment_author() ?>"/>
     </span>
     <?php } ?>

    Replace that with this code:

    <?php if (function_exists('get_avatar')) { ?>
    <span class="ListGrav">
    <?php echo get_avatar( $comment, 25 ); ?>
    </span>
    <?php } ?>

    There you go. No more need for the plugin. Also, the gravatar settings on Settings->Discussion will now work correctly.

    As far as moving it around on the page, we will need a real link to your real live site. We can't diagnose a problem like that through a picture. We have to see the live code.

  12. lamisto
    Member
    Posted 5 years ago #

    /me bows to otto42, thank you A LOT!!! it works now i just have to adjust the image size, that-s done from the style.css file right?

  13. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    That "25" in the code above is the image size, in pixels.

  14. Im-WP-Fan
    Member
    Posted 5 years ago #

    this is my problem too...

    Avatar display : Show Avatars
    Maximum Rating : G — Suitable for all audiences

    How to show my avatar or gravatar in my post?

    anyone help? please...

  15. Im-WP-Fan
    Member
    Posted 5 years ago #

    thank you wordpress, thank you gravatar...

    it works now...

  16. nyuuchiX
    Member
    Posted 5 years ago #

    http://www.1flyingkite.com/?p=25#comments

    please check out my page... the gravatars are floating a little high, what CSS commands can I use to move them lower? I'm using the code otto suggested.

    Also, when i tried to make the gravatar bigger, 40px instead of 25px, it would only show the default image instead of the correct gravatar image, anyone know why?

  17. Im-WP-Fan
    Member
    Posted 5 years ago #

    ...sometimes learned to be satisfied

  18. dyords
    Member
    Posted 5 years ago #

    hi otto, would you help me out with my digg theme? it doesn't seem to support the avatar and I was hoping you know how to insert the code on the comments.php.

    i would really appreciate it if you could help.

    thanks!

  19. dyords
    Member
    Posted 5 years ago #

    here's the piece of code that i think needs to be edited.

    <?php if ($comments) : ?>
    	<h3 id="comments"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to “<?php the_title(); ?>”</h3>
    
    	<ol class="commentlist">
    
    	<?php foreach ($comments as $comment) : ?>
    
    		<li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>">
    			<?php echo get_avatar( $comment, 32 ); ?>
    			<cite><?php comment_author_link() ?></cite> Says:
    			<?php if ($comment->comment_approved == '0') : ?>
    			<em>Your comment is awaiting moderation.</em>
    			<?php endif; ?>
    			<br />
    
    			<small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php edit_comment_link('edit','&nbsp;&nbsp;',''); ?></small>
    
    			<?php comment_text() ?>
    
    		</li>
  20. dyords
    Member
    Posted 5 years ago #

    uhmm, nevermind. was able to add WP's built-in avatar feature on my digg 3-colum theme. if you guys wanna know how i did it, i made a post here.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.