Support » Plugin: WP phpBB Bridge » [Plugin: WP phpBB Bridge] Author Avatar

Viewing 6 replies - 1 through 6 (of 6 total)
  • <?php echo get_avatar( get_the_author_meta( 'user_email' ), '50' ); ?>

    Okay so that’s what is displaying the image.

    [Code moderated as per the Forum Rules. Please use the pastebin]

    That’s the function that is grabbing the commenter’s avatar. I have a feeling the issue is with

    $qr = "SELECT u.user_avatar, u.user_avatar_typeFROM” . $table_prefix . “usersu WHERE u.user_email= '" . $comment->comment_author_email . "'";


    $comment->comment_author_email . "'";`

    I can’t find where $comment is getting filled. It’s working for comments no problem, but what I see, $comment is only getting passed “50”. Any pointers?

    Alright.. I got it working. I had to create a new function and then edit the theme a bunch. got it working!

    Any chance you can post the solution? Cheers

    No! It’s a secret!

    Okay so I’m not a php programmer but I know enough to figure things out. I couldn’t figure out a way to make it work within the same function because they have to call different variables from the SQL database. So what I did was copy the function, and then just change the variable..

    function get_forum_author_avatar($authemail, $size)
        global $user;
        $phpbb_config = trim(get_option('wpb_path'));
            $phpbb_config = trim(get_option('wpb_path'));
            $cn = mysql_pconnect($dbhost . ":" . $dbport, $dbuser, $dbpasswd);
                    $qr = "SELECT u.<code>user_avatar</code>, u.<code>user_avatar_type</code> FROM <code>&quot; . $table_prefix  . &quot;users</code> u WHERE u.<code>user_email</code> = '" . $authemail . "'";
                    $rs = @mysql_query($qr, $cn);
                while($i = mysql_fetch_assoc($rs))
                    $avatar = "<img class=\"avatar photo\" src=\"" . wpb_get_avatar($i['user_avatar'], $i['user_avatar_type']) . "\" alt=\"\" />";
        return $avatar;

    I put this right after the get_forum_avatar function. Then to make it work, I manually edited the theme file wherever it called for get_avatar for the author avatar, I changed it to get_forum_author_avatar. That was it!

    for me not work, need help 🙁

    i don’t find get_avatar work with get_forum_author_avatar, can u help me mbazdell,


Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: WP phpBB Bridge] Author Avatar’ is closed to new replies.