Both FB Connect & Drupal for Facebook modules allow users to import their profile picture during connect process. I am able to see the imported picture in user/edit mode but it doesn't show up on the profile rendered through user display module.

Comments

swentel’s picture

Try creating a new code field at admin/ds/ud/fields Use PHP code underneath and drag this new field in the overview screen.

// For facebook connect
return fbconnect_theme_user_picture_override($object);
// For Drupal for facebook
return fb_connect_theme_user_picture_override($object);
g.k’s picture

Awesome. Display Suite Rocks!!!

swentel’s picture

Status: Active » Fixed

I guess that's fixed then :)

g.k’s picture

Status: Fixed » Closed (fixed)

Yes, Thanks!

jrbalu’s picture

"Try creating a new code field at admin/ds/ud/fields Use PHP code underneath and drag this new field in the overview screen."

Could you please explain that a bit more? I am a drupal newbie.

davycw’s picture

Jrbalu, do you have the Display Suite module, and associated User Display module installed? You'll have to do that first.

Once they're installed, go to yoursite.com/admin/build/ds/ud. There will be an option to add a new "code field." Once you'd added the new code field, then go to the overview section of your Display Suite configuration, and drag that field, along with any others (such as title, date, body, etc..) that you wish to be shown on the user account page into one of the sections of your display (header, footer, content, etc...)

g.k’s picture

Status: Closed (fixed) » Active

It worked for facebook connect module

return fbconnect_theme_user_picture_override($object);

but recently, I switched from fbconnect to fb module and this function is not working

// For Drupal for facebook
return fb_connect_theme_user_picture_override($object);

g.k’s picture

Project: User displays » Drupal for Facebook
Version: 6.x-1.2 » 6.x-3.x-dev

I am guessing there is some function thats preventing fb user picture to override. Re-assigning the issue to fb for review.

Dave Cohen’s picture

Please don't take resolved threads and move them to different projects. Submit a new issue instead.

If you want help you'll have to be more specific than "this function is not working"

g.k’s picture

Dave, the only reason I re-assigned so that it's part of the thread which might be helpful to have some background and for others (@jrbalu), who may be facing same issue with DS/UD module and FB integration. If you prefer, I can close this issue and add reference in the new issue.

Thanks,

g.k’s picture

Project: Drupal for Facebook » User displays
Version: 6.x-3.x-dev » 6.x-1.2

Swentel, I'm re-assigning back to UD issue queue because when I disable the UD Full profile mode, it does start to display the user's facebook profile picture. I am not exactly sure what the problem is but both UD & DFF modules are trying to override. Thanks

Dave Cohen’s picture

Drupal for Facebook uses hook_theme_registry_alter to change both theme('username') and theme('user_picture'), if configured to do so. (currently in modules/fb/fb_connect.module, but likely to be moved to fb_user.module someday).

That said, if you two modules are competing to alter the same theme function, you're better off defining the function exactly the way you want it to be in your own theme. I'm not sure about User Displays, but Drupal for Facebook will not alter the functions by default if they are defined in your theme.

g.k’s picture

I do have both of overrides options (Override default theme_user_picture() & phptemplate_user_picture() functions) selected in the Facebook Connect configuration. It does override core profile picture with Facebook picture, but when I choose to render the user profile using User Display, I think it's overriding again with the core.

I am still learning through Drupal way of programming, can you please provide some reference on how to define override function at theme layer?

Thanks

swentel’s picture

Status: Active » Closed (works as designed)

I'm not using both modules, but if you use the functions in #1, User displays doesn't do anything with the output of that field.

le dendrite’s picture

DS is Awesome.
#1 works for me.
Just a note here.

If after #1 the user's FB photo shows up but is the wrong size.
Go here >>>> http://drupal.org/node/1005646