WordPress.org

Ready to get started?Download WordPress

Forums

Gravatar in 1.5? (9 posts)

  1. rach3ldr3w
    Member
    Posted 9 years ago #

    I'm currently using 1.5 of wordpress (the strayhorn version, classic style), and I've just installed the gravatar pluging. It works really well in Mozilla, but it doesn't work in IE. The first comment has the gravatar, but all the comments after it don't have it...

    Any suggestions?

  2. rach3ldr3w
    Member
    Posted 9 years ago #

    Now it's just showing the gravatar from the first post, but not any others... This is what happened in Ie.
    Here's what I have for the comments template that has the gravatar code:
    <?php if ( $comments ) : ?>
    <ol id="commentlist">
    <?php foreach ($comments as $comment) :
    if (function_exists('gravatar')) {
    if ('' != get_comment_author_url()) {
    echo "comment_author_url' title='Visit $comment->comment_author'>";
    } else {
    echo "
    ";
    }
    echo "<img src='";
    if ('' == $comment->comment_type) {
    echo gravatar($comment->comment_author_email);
    } elseif ( ('trackback' == $comment->comment_type) || ('pingback' == $comment->comment_type) ) {
    echo gravatar($comment->comment_author_url);
    }
    echo "' alt='a gravatar' class='gravatar' width='50' height='50' align=left/>
    ";
    } ?>

    <?php comment_text() ?>

    I also changed the CSS around the way the plugin site had it...
    I don't know what I'm doing wrong >.<'

  3. 7seconden
    Member
    Posted 9 years ago #

    I just checked my own site in IE. It doesn't show any Gravatar at all! I'd be glad to see someone come up with a solution for this problem.

  4. kristin
    Member
    Posted 9 years ago #

    That's odd. mine works fine in IE and in firefox. I use the plugin from the gravatar website : http://gravatar.com/implement.php#section_2_2

  5. rach3ldr3w
    Member
    Posted 9 years ago #

    Same here, I used that plug-in, and it shows up perfectly well in Firefox, but not in Ie. I then changed my plug-in to the skippy.net one, and it's still having the same problem :/

  6. kristin
    Member
    Posted 9 years ago #

    I didnt check racheldrew's site but 7seconden's might be a css problem? The code is there when you view the source so theres no other reason for it to not be there. Did you try floating it left to see if it makes a difference? You might have overflow: hidden and not have a width set that is making it funky in IE.

    *** thats just a guess ***

  7. aznbbj
    Member
    Posted 9 years ago #

    I think you're right Kristin. I removed ALIGN="RIGHT" from my IMG SRC and I can see my image in Internet Explorer now.

    Unfortunately it's no longer aligned right as I'd like it to be. Still trying to fix that.

  8. aznbbj
    Member
    Posted 9 years ago #

    Just wanted to follow up. I found a workaround for this.

    Here's my code in comments.php:
    <img class="gravatar" src="<?php gravatar("PG", 45) ?>" />

    As you see I created a class for gravatar. It's in my style.css file. Here's the declaration:

    .gravatar { border: 1px solid #ccc; position: relative; float: right; }

    Basically what I did was added a "position: relative;" in addition to "float: right;". The border is just an embellishment and not necessary.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags