I'm using Author Pane as part of an installation with APK (Advanced Profile Kit) and there is no picture displayed in it.
The function theme_fb_username is called correctly (even if I wasn't able to understand why) to render Facebook username instead of the drupal one, but no picture is displayed because theme_fb_user_picture is not called and the picture field for the user, created with facebook connect, correctly doesn't contain anything.

Comments

mottolini’s picture

Status: Active » Closed (works as designed)

After some investigation I was able to understand that the "problem" is in the Author Pane itself, because it doesn't call the theming function to render a user picture but it manages rendering of it through the use of some template files. This is due to the fact that Author Pane gives users the possibility to choose an imagecache preset to render the image.
I will post in Author Pane issue queue a features request, because I think that adding a "normal rendering" option would be nicer for us, DFF users, and other modules as well.
So far I found the easiest solution is to add a template file named author-pane-user-picture.tpl.php to your theme, whose content should be:

<?php if (!empty($picture)) { ?>
  <div class="picture">
    <?php if ($imagecache_used): ?>
      <a href="/<?php print $account->picture; ?>" rel="lightbox"><?php print $picture; ?></a>
    <?php else: ?>
      <?php print $picture; ?>
    <?php endif; ?>
  </div>
<?php } else {
  $fbu = fb_get_fbu($account->uid);
  $output = '<span class="fb_show" style="display:none;"><div class="picture">';
  $output .= '<fb:profile-pic linked="false" facebook-logo="true" size="small" uid="'.$fbu.'"></fb:profile-pic>';
  $output .= '</div></span>';
  echo $output;
 } ?>
brian brovelli’s picture

Thank you!

svidot’s picture

Thanks! been struggling for a while