WordPress.org

Ready to get started?Download WordPress

Forums

Where to put gravatar line? (27 posts)

  1. StookerT
    Member
    Posted 9 years ago #

    I installed WP Gravatar Signup v1.5 from http://txfx.net/2005/03/11/wp-gravatar-signup/ uploaded to the plugin folder, activated the plugin, made /gravatar-signup/gravatar-cache.txt writable, put this <?php show_gravatar_signup(); ?> in comments.php, and now I have to put this line somewhere:

    <img src="<?php gravatar("R", 40, "http://www.somewhere.com/heatvision.jpg", "FF0000"); ?>" alt="" />

    But where ? :-)

  2. StookerT
    Member
    Posted 9 years ago #

    nobody knows ?

  3. vkaryl
    Member
    Posted 9 years ago #

    In general, the call for a plugin should be put into the file where you want the plugin output to appear.

  4. RosieMBanks
    Member
    Posted 9 years ago #

    I found these posts on gravatars in the forum. Some of them mention where the code goes:

    http://wordpress.org/support/topic/30874
    http://wordpress.org/support/topic/34093
    http://wordpress.org/support/topic/35263

  5. Jinsan
    Member
    Posted 9 years ago #

    comments.php

  6. MichaelH
    Member
    Posted 9 years ago #

    That Plugin author's instructions say nothing special has to be done in 1.5 after activating, unless your Theme requires it. Seems like the Plugin is working on your site though I didn't register completely.

  7. StookerT
    Member
    Posted 9 years ago #

    I followed the advice from those topics and placed the line here:

    <?php if ( $comments ) : ?>
    <ol id="commentlist">
    <?php foreach ($comments as $comment) : ?>
    <li id="comment-<?php comment_ID() ?>">
    <div class="clearer"> </div>
    <div class="commentname">
    <span class="commentauthor">
    <img src="<?php gravatar("R", 40, "http://www.somewhere.com/heatvision.jpg", "FF0000"); ?>" alt="" />
    <?php comment_author_link() ?>
    </span>
    </div>

    But instead of the avatars, I get this error when I go to the articlepage where the comments stand.

    So either the line is wrong or the place where I put it is wrong.
    Anybody understand the error?

    Greetz,

    Jeroen Stooker

    Fatal error: Call to undefined function: gravatar() in /home/stooker/public_html/wp-content/themes/rin/comments.php on line 21

    ps. look at http://www.stooker-web.nl/?p=57#comments down below if you want to see the problem.

  8. StookerT
    Member
    Posted 9 years ago #

    Jinsan, you're not registred and still see your gravatar on my site and no error? :-| Strange?

  9. melbell
    Member
    Posted 9 years ago #

    Are you sure you activated the plugin?

  10. StookerT
    Member
    Posted 9 years ago #

    yep completely sure, but activated or deactivated it doesn't matter the error stays there.

    Maybe I should try another gravatar plugin, altough I got the feeling it's just the placing of that line.

  11. melbell
    Member
    Posted 9 years ago #

    make sure there are no blank spaces before or after your php tags in the plugin file. That can sometimes cause WordPress not to read it properly

  12. StookerT
    Member
    Posted 9 years ago #

    You mean in comments.php ? I remowed the spaces before and after

    <img src="<?php gravatar("R", 40, "http://www.somewhere.com/heatvision.jpg", "FF0000"); ?>" alt="" />

    But still the same error.

  13. melbell
    Member
    Posted 9 years ago #

    No, I mean in the plugin file itself. If you have any spaces at the beginning or end of the file it can mess things up

  14. Cypher
    Member
    Posted 9 years ago #

    The Gravatar-singup plugin simply adds a checkbox that users can check when they comment on your website to create their own gravatar.

    To actually show commeter's gravatar, you need the 'gravatar' plugin which houses the gravatar(); call. The Signup plugin doesn't display it for you.

    You need 2 plugins here to accomplish the two distinct tasks.

    Regards

  15. melbell
    Member
    Posted 9 years ago #

    There you go...I see your comments now

  16. melbell
    Member
    Posted 9 years ago #

    OOOooooohhh...You don't have the gravatar plugin, just the signup one...that should explain it then. Good catch Cypher

  17. StookerT
    Member
    Posted 9 years ago #

    Ok, tried skippy and the other one, can't get it to work. Who knows where to download the easiest plugin to show and signup for gravatars?

    I'm open to try them all by now :-)

  18. Cypher
    Member
    Posted 9 years ago #

    I use the plugin that is available from Gravatar.com itself. It doesn't do caching or anything fancy. Very simple and easy to use.

    Lemme know if you need help with this one cuz I have it implemented.

    Regards

  19. StookerT
    Member
    Posted 9 years ago #

    ok I'm trying the wp-gravatar. Uploaded gravatar.php tot plugins dir, activated plugin, last step put this line into comment.php

    <img src="<?php gravatar("R", 40, "http://www.somewhere.com/heatvision.jpg", "FF0000"); ?>" alt="" />

    But where?

  20. StookerT
    Member
    Posted 9 years ago #

    YEAH !!!!!!!!!!!!!!! Thanks :P damn why didn't I get those other ones running. Anyway it works now :)

    pfff....computers are hard to understand.

  21. StookerT
    Member
    Posted 9 years ago #

    Except why don't I have a border, I followed the instructions and got this line:

    <?php gravatar("R", 40, "http://www.somewhere.com/heatvision.jpg", "#000000"); ?>

    Where the #000000 should give a 1px black border, not?

  22. Cypher
    Member
    Posted 9 years ago #

    I just added a new class to my "styles.css" file for my theme called:

    .gravatar
    {
    background-color: #fff;
    padding: 3px;
    margin: -3px 8px 5px 0px;
    border: 1px;
    border-style: solid;
    border-color: #b8b8b8;
    }

    And then where you have the IMG tag for your gravatar, just add 'class="gravatar"' and change the color if you want and you'll get the border and more.

    Regards

  23. StookerT
    Member
    Posted 9 years ago #

    Thanks for the tip, where must I exactly place the 'class="gravatar"' in this line?

    <img src="<?php gravatar("R", 40, "http://www.stooker-web.nl/wp-content/themes/rin/images/gravatar.jpg", "#000000"); ?>" alt="" />

    and must I delete the #000000 then?

  24. Marc
    Member
    Posted 9 years ago #

    You have a bigger problem than that. Your showing this error at the bottom of the comment page:

    Fatal error: Call to undefined function: show_gravatar_signup() in /home/stooker/public_html/wp-content/themes/rin/comments.php on line 108

    Looks like you forgot to add the plugin code for sighup.

    I you need a border around the image it has to be set in the CSS.

  25. StookerT
    Member
    Posted 9 years ago #

    Ok got the rss changed, comment.php changed back, sign-up plugin gone. Think it works fine now. Maybe I should try to get the signing thing working :-)

  26. Marc
    Member
    Posted 9 years ago #

    Just checked again. Looks OK, Grav signup works. Good job!

    BTW I also use rin, you can view my version of Gravatar design here, you you desire.

    It's close to what you have plus dropshadows and flags of origin.

  27. StookerT
    Member
    Posted 9 years ago #

    Nice job man !! I messaged you.

    Greetz

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.