• Resolved icco

    (@icco)


    I recently started using gravatar, and im wondering if anyone knows a way to make it so you can have an icon next to the post to show who posted it.

Viewing 5 replies - 31 through 35 (of 35 total)
  • I currently use gravatar…if anyone needs any help…let me know…contact me through my website… link is in my profile

    jxpx777 i noted your site, and just wonderinf if that alignemtnt was forced or something that you had set?

    @jinsan The alignment of the gravatar is set by adding style features to the img tag. So, you could have

    <img src="<?php post_gravatar ?>" style="float:left; and any other style attributes">

    You could also insert a style class and control your gravatar behavior from your style.css. So, you could have

    <img class="postgravatar" src="<?php post_gravatar ?>">

    And you could do the same for the comment gravatar. If you wanted less work and you wanted your gravatars to behave the same way on posts and comments, then you could have just one class for “gravatar” and style that in style.css. This would also help trim your stylesheet size. Personally, I think the reason you couldn’t tell what was happening with mine is because I haven’t styled gravatars, but I styled any image that is an anchor (img a { in css) to float left. Who knows, I may need to change that in the future, but for now it is working just fine.

    Let me know if I can be of any more help.

    Godspeed,

    Thread Starter icco

    (@icco)

    @jxpx777 : it was giving me a funky error, but its fixed now.

    @jinsan : here is what i have in my main page php.

    <div class=”post”>
    <h2 id=”post-<?php the_ID(); ?>”><?php $grav_email=$authordata->user_email; $grav_url = “https://www.gravatar.com/avatar.php?gravatar_id=&#8221;.md5($grav_email).”&default=”.urlencode($default).”&size=50″; echo “<img src=\”$grav_url\” alt=\”gravatar\” hspace=\”5\” align=\”left\”/ >” ; ?>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></h2>
    <small><?php the_time(‘F jS, Y’) ?> by ” title=”<?php the_author_url(); ?>” ><?php the_author() ?> </small><br clear=”all”/ >

    so now

    <?php $grav_email=$authordata->user_email; $grav_url = “https://www.gravatar.com/avatar.php?gravatar_id=&#8221;.md5($grav_email).”&default=”.urlencode($default).”&size=50″; echo “<img src=\”$grav_url\” alt=\”gravatar\” hspace=\”5\” align=\”left\”/ >” ; ?>

    gets the image and

    <?php the_author() ?>

    gets the authors name.

    Thread Starter icco

    (@icco)

    @jxpx777 : i was wrong, the error is back. whenever i post a comment i get this:

    Fatal error: Call to undefined function: mcrypt_get_iv_size() in /home/spyweb1/spy1u1010/html/blog/wp-content/bot-check/bc-config.php on line 22

    the page im getting it on is https://www.jamiephelps.com/wp-comments-post.php

Viewing 5 replies - 31 through 35 (of 35 total)
  • The topic ‘Gravatar as poster’ is closed to new replies.