* @copyright Curverider Ltd 2008 * @link http://elgg.com/ */ //get the required variables $title = $vars['entity']->title; $description = autop($vars['entity']->description); $group = get_entity($vars['entity']->container_guid); $num_topics = $vars['entity']->countEntitiesFromRelationship("forum_topic"); $forum_created = friendly_time($vars['entity']->time_created); // get the topic entities $entities = $vars['entity']->getEntitiesFromRelationship("forum_topic"); $counter = 0; foreach($entities as $ent){ //count the post annotations for each topic $counter = $ent->countAnnotations("topic_post"); } $info = "

" . elgg_echo('created') . " " . $forum_created . ", " . elgg_echo('with') . " " . $num_topics . " " . elgg_echo('topics') . " " . elgg_echo('and') . " " . $counter . " " . elgg_echo('posts') . ".

"; //get the group avatar $icon = elgg_view("profile/icon",array('entity' => $group, 'size' => 'tiny')); //get the group and topic title $info .= "

" . elgg_echo('group') . ": getURL()}\">{$group->name}

"; $info .= "

" . elgg_echo('groups:topic') . ": guid}&group_guid={$group->guid}\">{$title}

"; //get the forum description $info .= $description; //display echo elgg_view_listing($icon, $info); ?>