WordPress.org

Ready to get started?Download WordPress

Forums

Facebook Connect - Avatars in P2/Prologue/Rask (11 posts)

  1. jvinch
    Member
    Posted 5 years ago #

    Interesting problem.

    The Prologue, P2 and Rask themes replace the get_avatar hook with something called prologue_get_avatar. This function is defined (in Rask theme, anyway) as

    function prologue_get_avatar( $user_id, $email, $size ) {
    	if ( $user_id )
    		return get_avatar( $user_id, $size );
    	else
    		return get_avatar( $email, $size );
    }

    Problem arises when implementing Facebook Connect - since it relies on get_avatar, posters and commenter avatars that signed in via Facebook show up as anonymous users.

    Not really a coder but I'm a star at cut and paste - anyone have any ideas on how to adjust this function to account for the Facebook avatar scenario?

    Thanks in advance,

    John

  2. Daniel Drake
    Member
    Posted 5 years ago #

    Seconded; I'd like to know as well.

    - Daniel

  3. Mistainu
    Member
    Posted 5 years ago #

    has anyone any idea how to fix this?

  4. jvinch
    Member
    Posted 5 years ago #

    Since I reported this issue, I deleted the prologue_get_avatar function and renamed all occurrences in various theme files to the regular get_avatar.

    That didn't yield the proper result either, so I am assuming it's something else that's causing the issue.

    At this point, I'd be interested in learning if anyone has the FB Connect and P2/Prologue/Rask combination working propertly.

  5. island2012
    Member
    Posted 5 years ago #

    I would also be interested in seeing a solution to this... thank u!

  6. rinconrise
    Member
    Posted 4 years ago #

    Hi,

    did anybody make any progress in this.

    I would love to have the users sign in with Facebook to my page if they have one.

    Thanks

  7. Nobble
    Member
    Posted 4 years ago #

    the gigya plugin displays the (facebook) gravatars correctly. You can either use that plugin on your site or figure out how that plugin manages to get the gravatars to display correctly.

  8. AnniPotts
    Member
    Posted 4 years ago #

    Sound like a similar problem to what I'm having with the Facebook Fan feed working properly. It's fine in other themes just not in p2.

    I've requested help here http://wordpress.org/support/topic/310726?replies=1

  9. sennad
    Member
    Posted 4 years ago #

    I got it working on P2, in functions.php (line 311) I replaced prologue_get_avatar with

    <?php echo get_avatar( $comment, 32 ); ?>

    but facebook avatars aren't resized to 32, and it messes theme (avatar is not inline with comment autor name, it is on top of it) so it must be an extra <div> somewhere in fbconnect...

    any help?

  10. dlopeman
    Member
    Posted 4 years ago #

    sounds like some style.css editing may be in order... and add some DIVs around the avatar. I was doing this on my site but it is VERY finicky!!

  11. sennad
    Member
    Posted 4 years ago #

    It's looking good now. In "common.php" (fb connect plugin), delete <div> on line83 for positioning the avatar, then add <span class> that sets "float:left" in css. For avatar size in same file edit line 84 to look like this - <fb:profile-pic uid="$user" facebook-logo="true" size="square" width="40px"></fb:profile-pic> (width is optional). Now all my comments have avatar from Facebook and gravatar for registrated users. As for p2, I want to allow all my members to post content so I have to figure it out how to display avatar on post (entry.php)...

Topic Closed

This topic has been closed to new replies.

About this Topic