Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

r-a-y

By: a guest on Aug 10th, 2010  |  syntax: None  |  size: 1.23 KB  |  views: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.                 if ( (int)$activities_template->activity->user_id )
  2.                         $item_id = $activities_template->activity->user_id;
  3.                 //else if ( $activities_template->activity->item_id )
  4.                 //      $item_id = $activities_template->activity->item_id;
  5.  
  6.                 $object = 'user';
  7.                 //if ( $bp->groups->id == $activities_template->activity->component && !(int) $activities_template->activity->user_id )
  8.                 if ( $bp->groups->id == $activities_template->activity->component ) {
  9.                         $object = 'group';
  10.                         $item_id = $activities_template->activity->item_id;
  11.                 }
  12.                 if ( $bp->blogs->id == $activities_template->activity->component ) {
  13.                         $object = 'blog';
  14.                         $item_id = $activities_template->activity->item_id;
  15.                 }
  16.  
  17.                 $object = apply_filters( 'bp_get_activity_avatar_object_' . $activities_template->activity->component, $object );
  18.  
  19.                 /* If this is a user object pass the users' email address for Gravatar so we don't have to refetch it. */
  20.                 if ( 'user' == $object && empty($email) )
  21.                         $email = $activities_template->activity->user_email;
  22.  
  23.                 return apply_filters( 'bp_get_activity_avatar', bp_core_fetch_avatar( array( 'item_id' => $item_id, 'object' => $object, 'type' => $type, 'alt' => $alt, 'class' => $class, 'width' => $width, 'height' => $height, 'email' => $email ) ) );
  24.         }