Skip to:
Content
Pages
Categories
Search
Top
Bottom

Link to Gravatar on user profile edit page (no psychics among my users)


  • Manuel Fritsch
    Participant

    @let-me-see

    Hello all,

    it is nice to have Gravatars built in with bbpress (and actually WP, of course). However, unless my users get to know about this service, they will never find out. They have nothing to do with the WP community and so they never heard of it. It’s like RSS to some remote amazon natives.

    So I propose a small notice with a link to gravatar.com below the profile picture on user profile edit pages. Could the delevolers integrate that? I would be most happy!

    Best
    Manuel

Viewing 9 replies - 1 through 9 (of 9 total)

  • Robin W
    Moderator

    @robin-w

    what would the small notice say?


    Manuel Fritsch
    Participant

    @let-me-see

    “Upload a profile picture on Gravatar.”

    Something like that, possibly in better English, since I am not a native speaker.

    Hi,
    Try this in a child theme or functions.php (I didn’t really test it, but this could be a way to do):

    function casiepa_mention_gravatar() {
                echo 'Upload a profile picture on <a href="gravatar.com">Gravatar</a>';
    }
    
    add_action( 'bbp_theme_after_reply_author_details', 'casiepa_mention_gravatar' );
    add_action( 'bbp_theme_after_topic_author_details', 'casiepa_mention_gravatar' );

    Pascal.


    Manuel Fritsch
    Participant

    @let-me-see

    Thanks, but it broke my site. Also, did you include the “? Please don’t.


    Brandon Allen
    Participant

    @thebrandonallen

    I’m assuming you mean that it broke your layout, and not your site, because the code @casiepa posted works. Also, there’s no question mark in the code that he posted.

    If you want the link to Gravatar to show only on a user’s edit profile page, try this:

    function casiepa_mention_gravatar() {
    ?>
    
    <div>
    	<label for="bbp-gravatar-notice">Avatar</label>
    	<span name="bbp-gravatar-notice" class="description">Manage your profile picture at <a href="https://gravatar.com" title="Gravatar">Gravatar</a>.</span>
    </div>
    
    <?php
    }
    add_action( 'bbp_user_edit_after_about', 'casiepa_mention_gravatar' );

    Manuel Fritsch
    Participant

    @let-me-see

    It really had given me a white screen of death, or how it is called…

    Well, thanks, Brandon! It shows right underneath the profile box, that is a good spot for it. Could you also tell me how to put the notice box in line with the rest of the fields?

    Gravatar notice box slightly off to the left

    (Image not working? Here is the link)


    Brandon Allen
    Participant

    @thebrandonallen

    Try this

    function casiepa_mention_gravatar() {
    ?>
    
    <div>
    	<label for="bbp-gravatar-notice">Avatar</label>
    	<fieldset style="width: 60%;">
    		<span style="margin-left: 0; width: 100%;" name="bbp-gravatar-notice" class="description">Manage your profile picture at <a href="https://gravatar.com" title="Gravatar">Gravatar</a>.</span>
    	</fieldset>
    </div>
    
    <?php
    }
    add_action( 'bbp_user_edit_after_about', 'casiepa_mention_gravatar' );

    Manuel Fritsch
    Participant

    @let-me-see

    Thank you Brandon! It looks great!


    romwrit
    Participant

    @romwrit

    My gravatar shows correct on the gravatar page, but not on my site. I have that blue G. I linked my website. How long does it take to change the gravatar on my wordpress site gwynplum.com?

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Skip to toolbar