WordPress.org

Ready to get started?Download WordPress

Forums

Plugin wanted: Author Avatar (For site with multiple post authors) (14 posts)

  1. ksquare
    Member
    Posted 8 years ago #

    Does WordPress have this plugin already written? Basically for an author pic to appear next to the post they write? Useful for sites with multiple authors.

    Appreciate it if I could a response.

    Thanks!

  2. skippy
    Member
    Posted 8 years ago #

    My Gravatars plugin supports per-user gravatar images on the local blog. You could use it to display the author image in your template file.

  3. Kahil
    Member
    Posted 8 years ago #

    would it post like the multi-topic icon plugin? where it puts the avatar in, makes that avatar a link to all posts by that author's posts, and then wrap the text around it?

    thanks

  4. moloko
    Member
    Posted 8 years ago #

    I do not like gravatars. I rather have everything on my server. I think you could use custom field for this or even make a quicktag for it.

  5. skippy
    Member
    Posted 8 years ago #

    My Gravatars plugin does not require gravatar.com -- it can manage locally stored images for locally-registered users.

    Kahil: you can use my plugin's gravatar() function to display gravatars anywhere inside your templates, however you want. If you want the gravatar image to link to that author's posts, simply wrap the image inside the appropriate anchor tag.

  6. Kahil
    Member
    Posted 8 years ago #

    Thanks Skippy! When inserted, does fit into the text nicely? By that I mean, does it look like this....(where the I's are the image and T are the text)...

    IIIII TTTTTTTTTTTTTTTT
    IIIII TTTTTTTTTTTTTTTT
    IIIII TTTTTTTTTTTTTTTT
    TTTTTTTTTTTTTTTTTTTT
    TTTTTTTTTTTTTTTTTTTT

    Where it wraps around the image?

    Thank you!!!

  7. Ryyo
    Member
    Posted 8 years ago #

    You can assign a style to the author image that will align it in the manner you're asking about. Try giving the gravatar image a class="gravatar" or putting it in a div with class="gravatar", then dropping in a CSS rule to float the image left:

    img.gravatar
    {
    float:left;
    margin:5px;
    padding:0;
    }

    or

    div.gravatar img
    {
    float:left;
    margin:5px;
    padding:0;
    }

    Make sure your image is directly before your text though, or it will appear below your post!

  8. tyr
    Member
    Posted 8 years ago #

    Similarly, I'd like to post an avatar at the beginning of each post based on the author of the post.

    I've downloaded and installed Skippy's gravatar plugin and at this point I can get an avatar to show up in posts by using this code: <gravatar example@dot.com>.

    However, what I'd like to do is to automate this process to show an avatar based on an author, and I'm not sure how to code this.

    I've read through the documentation and the support wiki (http://codex.wordpress.org/Using_Gravatars), but I'm not finding clear instructions on how to do this.

    When I added the code 'gravatar();' to what I think is the appropriate place within the "index.php" of the theme (above 'the_content():'), I get a text that refers to the location of the avatar in the appropriate place. When I try to incorporate this code in an image:

    '<img src="<?php gravatar(); ?>" />'

    the page fails to load. In addition, the code is referring to the location of the generic avatar and not the author's avatar. Here are my two questions that would really help (and I'd be happy to fill in the wiki documentation if someone can first let me know the answer!)

    1) What is the appropriate code, and where should I place this code to get it to show up at the beginning of each post?

    2) What code do I need to use to call the correct author of the post?

    Thanks in advance! And a Happy New Year to anyone reading this today!

  9. tyr
    Member
    Posted 8 years ago #

    After hacking away for a while longer, I was able to get the avatar to work. Here's what I did... I added the following text above 'the_content();' (in two places!)

    if (function_exists('gravatar')) {
    echo "<img src='";
    echo gravatar(get_the_author_email());
    echo "' alt='' class='gravatar' />";}

    I must have tried 10 different ways to call the author email, before I found 'get_the_author_email' worked!

    Since this worked, I'm going to go ahead and implement this solution on my site, but if anyone has a better way to code this, I'd be interested in hearing about it!

  10. styril
    Member
    Posted 8 years ago #

    It doesn't seem to work for me. For some reason, this shows up right above an X image.

    if (function_exists('gravatar')) { echo "";}

    The image does not show but has the link http://chronos.marvinsweb.com/blog/";echo%20gravatar(get_the_author_email());echo%20"

  11. cheesemasterdan
    Member
    Posted 8 years ago #

  12. sufehmi
    Member
    Posted 7 years ago #

    tyr - thanks for your leads.

    I've got a strange problems though -- get_the_author_email() doesn't work (WP 2.0.4)

    After looking around, I managed to get Gravatar working without any plugin with this code in my blog's template :

    <img src="http://www.gravatar.com/avatar.php?gravatar_id=<?php global $authordata; echo md5($authordata->user_email); ?>" />

    Using this code, I was able to get the Author's gravatar to show up on each of his/her post -- with no plugin.

    Hope it helps someone.

  13. xba
    Member
    Posted 7 years ago #

    I have written a new plugin for downloading / managing different sortes of avatars (pavatars, favatars, gravatars and local avatars).

    It's available on my blog : http://www.john-noone.com/2006/10/08/identikit/

  14. silverelf
    Member
    Posted 7 years ago #

    Does this plugin work for multiple user with author priviledge? I want to create a class blog.

    xba, I don't understand french >.< Is your plugin in french also? The instructions too sigh..

    Which plugin's the best one to use for now?? Any help or recommendations would be deeply appreciated thz~!! =)

Topic Closed

This topic has been closed to new replies.

About this Topic