Skip to:

Getting group avatar from within activity loop

  • I am displaying the latest forum posts using the activity loop as per:

    I would like to display the GROUP AVATAR each forum post belongs to, but dont know how to do this. I am able to get the title of the group, the link, id but am not able to get the code for the actual file. The code I need looks like this:

    `<img src=";`

    I am able to get all pieces of this code except the long string encoding: 33d271f434b9472f3901ff564b1794b0.
    Is this code generated using MD5 or something?

    I appreciate any help I can get.
    My code is below and you can view a live demo at:


      if ( bp_has_activities(“max=15&action=new_forum_post”) ) : ?>

    • <a href="”>

      <!– display activity_content_body without the

      tags –>

      $bodyContent = bp_get_activity_content_body();
      $clrString = array(“


      $bodyContent = str_replace($clrString, ”, $bodyContent);
      echo $bodyContent;

      $tm = bp_get_activity_date_recorded() ;
      echo “há “._ago($tm);

      <a href="<?php $trunc_url = bp_get_activity_thread_permalink(); $trunc_url = substr($trunc_url, 0, strrpos($trunc_url, '#')+1);
      echo $trunc_url; ?>post-reply”> Responder


  • The topic ‘Getting group avatar from within activity loop’ is closed to new replies.
Skip to toolbar