Getting group avatar from within activity loop
-
I am displaying the latest forum posts using the activity loop as per: http://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/
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="http://www2.gamesphere.com.br/files/group-avatars/15/33d271f434b9472f3901ff564b1794b0-bpfull.jpg"`
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: http://www.gamesphere.com.br/gsDEV/index.php
thanks`
-
<a href="”>
<!– display activity_content_body without the
tags –>
<?php
$bodyContent = bp_get_activity_content_body();
$clrString = array(““,”
“);
$bodyContent = str_replace($clrString, ”, $bodyContent);
echo $bodyContent;
?><?php
$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
<?php
if ( bp_has_activities(“max=15&action=new_forum_post”) ) : ?>`
-
- The topic ‘Getting group avatar from within activity loop’ is closed to new replies.