Skip to:
Content
Pages
Categories
Search
Top
Bottom

avatars in wordpress and bbpress

  • Hey all,

    So I’ve searched both this forum and the WP forum. And there are a ton of avatar related threads, and I’ve read through most of them. It looks like there have been a few various implementations.

    But most of those threads are almost a year old, and now we’re in 2.5 and .9.0.1 land… and so I’d love a definitive uptodate answer as to which plugin(s) to use to best integrate avatars into both sites.

    Gravatars are cool and all (I do have an integrated user base) but pretty much the first question people asked is how they can upload an avatar without using gravatars (I think some people don’t want their image suddenly showing up all over the web wherever they’ve commented in the passt)

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

  • _ck_
    Participant

    @_ck_

    The Avatar Upload plugin is fairly well developed and I believe there is a hack to show them on the WordPress side as well. It does take a little bit of time to setup though.

    OK, so it looks like the plugin version 0.8.3 still works in bbPress 0.9.1 – though I have not yet put it through heavy testing. I found the install directions left a little to be desired so I added more detailed directions below.

    However… I still have a question. Some of my users have adopted Gravatars since WP 2.5 was released. The plugin currently does not seem to check for gravatar existence, let alone provide some sort of control over precedence of different sourced avatars.

    The installation instructions DO provide you with the function to call to see if a plug-in uploaded/created avatar exists. However, in order to get the precedence working the way I’d like, I need to know how to test for a Gravatar existence as well. Any ideas? Thanks in advance.

    Any ideas?

    Install instructions:

    1. Download Plugin here:

    http://bbpress.org/plugins/topic/avatar-upload/

    Version 0.8.3 is current at time of this writing.

    2. Create the following two folders in your bbpress install:

    /my-plugins

    /avatars

    3. follow instructions (specifically, step 5) in the readme file which tells you where to copy files. Some files in the zip aren’t mentioned (such as indenticon.php). I put those into my-plugins and so far, so good.

    4. Activate plugin.

    to better illustrate my issue, my current code for the profile page is:

    if ( avatarupload_get_avatar(ID) ) {

    avatarupload_display($user->ID);

    } else {

    echo bb_get_avatar( $user->ID );

    }

    which means if uploaded avatar exists then display it, else get gravatar.

    but what i really want is:

    if uploaded avatar exists then display it, else if gravatar exists then display that, but if neither exists then display the avatar upload default avatar.

    Right now it displays gravatar default instead. which isn’t my first choice since avatar upload would give me control over the default image which is better for obvious reasons.

    affact, your code is just what i was searching for. unfortunately it just doesn’t work :/

    Not sure what you mean – the code I had above should do what I say it did, it just didn’t do what I wanted.

    That said? I now have it working the way I wanted.

    This code:

    Gets the bbPress avatar, if it exists.

    Checks to see if it’s an Identicon…

    No? Display it.

    Yes? Display Gravatar… but with the URL of the Identicon set as the default in case none exists.

    Problem solved.

    Note: I believe Gravatar recently integrated Identicons as a default setting, so you can probably do this now without Identicons setup in bbPress by modifying the code some. But this works.

    PROFILE.PHP:

    $ava = avatarupload_get_avatar($user->ID,1,1,0);

    if ( avatarupload_get_avatar($user->ID) && !(usingidenticon($user->ID) )) {

    avatarupload_display($user->ID);

    }

    else {

    echo bb_get_avatar($user->ID,48,$ava[0]);

    }

    POST.PHP:

    $ava = avatarupload_get_avatar(get_post_author_id(),1,1,0);

    if ( avatarupload_get_avatar(get_post_author_id()) && !(usingidenticon(get_post_author_id()) )) {

    avatarupload_display(get_post_author_id());

    }

    else {

    post_author_avatar(48,$ava[0]);

    }


    BloggerDesign
    Member

    @bloggerdesign

    This code works fantastic! Thanks


    RoyalManG
    Member

    @royalmang

    I have followed the procedure in the readme.txt, default avatar is displayed in the post and in profile, but I can not change it when I click the Upload Avatar, so I diverted to the home page forum :-( (translate by google tranaslate O :-))


    sontru
    Participant

    @sontru

    @RoyalManG – you need to change line 7 in avatar-upload.php to bb_auth(‘logged_in’); // logged in?

    I’ve having a bit of a problem with this Avatar Upload plugin when uploading files larger than the specified dimensions. If I do so bbPress just displays a blank page with this address: http://<forumdomain>/bbforum/profile/<user>/avatar

    Has anyone come across this before and can help?


    sontru
    Participant

    @sontru

    Hey! I’ve now fixed my problem :)

    The system (Debian 6) was missing or had an old version of php5-gd installed. apt-get install php5-gd and restarting the apache2 server fixed the problem of the blank pages.

    Also these code changes by _ck_ helped to improve Avatar Upload:

    Delete avatar function: http://bbpress.org/plugins/topic/avatar-upload/page/5/#post-1093

    Make identicon function work: http://bbpress.org/plugins/topic/avatar-upload/page/5/#post-1096

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

You must be logged in to reply to this topic.