You are here

function fbconnect_comment in Facebook Connect 6.2

Implements hook_comment(). Change comment user pictures to use the preferred fbconnect preset.

File

./fbconnect.module, line 823
Integration with Facebook Connect API.

Code

function fbconnect_comment(&$comment, $op) {
  if ($op == 'view' && theme_get_setting('toggle_comment_user_picture')) {

    // If this is a comment preview, we need to manually add $comment->picture.
    if (!empty($comment->uid) && !isset($comment->picture)) {
      $comment->picture = db_result(db_query("SELECT picture FROM {users} WHERE uid = %d", $comment->uid));
    }
    if ($preset = variable_get('fbconnect_pic_size_comments', '')) {
      $comment->fbconnect_picture_preset = $preset;
    }
  }
}