Forums

Join
bbPress Support ForumsPluginsHACK: User avatar from WPMU Avatar Plugin

Info

HACK: User avatar from WPMU Avatar Plugin

  1. If anyone is using ' Avatar pluginsuleiman, here's a hack I use to show the WPMU's avatar in BBPress:

    In post.php, after the <small><?php post_author_title(); ?></small> bit I use the following:

    <?php
    $userid = get_post_author_id();
    $wp_avatar = '/full/path/to/public_html/wp-content/avatars/' .$userid. '.jpg';
    $wp_avatarURL = '/wp-content/avatars/' .$userid. '.jpg';
    
    if (file_exists($wp_avatar)) {
    echo '<img class="avatar" src="'. $wp_avatarURL.'" />';
    }
    ?>

    Probably not the most elegant, but it works:

    http://blognola.org/forums

    Vincent

  2. thanks for the hack vincent, I'm glad to see you got it integrated into bbpress. I'm using your hack myself :)

  3. oh neat! :) You're very welcome.

  4. Awesome, thanks for this!

  5. Hi!

    I've made a plugin to do the same. Makes it easy to show the avatar in posts and profile. It's just to drop one line in e.g. post.php, and the avatars shows up.

    You can check it out -> download.
    --
    Rune

  6. so cool, thanks a lot!

  7. You must log in to post.