diff options
author | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-07 15:44:54 +0000 |
---|---|---|
committer | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-07 15:44:54 +0000 |
commit | 051f7291dc66f8312d2af2cab3cc21c03bc63349 (patch) | |
tree | 8ec2116f19b98f175c0f08f83572e4fc2702062a /mod/groups/views | |
parent | 8ea3f21844bd4895c959b57c0fa9a497aadc7f50 (diff) | |
download | elgg-051f7291dc66f8312d2af2cab3cc21c03bc63349.tar.gz elgg-051f7291dc66f8312d2af2cab3cc21c03bc63349.tar.bz2 |
forum latest for group profile page
git-svn-id: https://code.elgg.org/elgg/trunk@1763 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views')
-rw-r--r-- | mod/groups/views/default/groups/forum_latest.php | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/mod/groups/views/default/groups/forum_latest.php b/mod/groups/views/default/groups/forum_latest.php index f0a62a14f..dc2857f12 100644 --- a/mod/groups/views/default/groups/forum_latest.php +++ b/mod/groups/views/default/groups/forum_latest.php @@ -1,14 +1,22 @@ -<h2>Forum latest</h2>
+<h2><?php echo elgg_echo("groups:forumlatest"); ?></h2>
<?php
-//get the latest from the group files
-// Display them
- // list_entities_from_annotations($entity_type = "", $entity_subtype = "", $name = "", $value = "", $limit = 10, $owner_guid = 0, $group_guid = 0, $asc = false, $fullview = true) {
-
- set_context('search');
- // $forum_topics = list_entities_from_annotations("object", "groupforumtopic", "group_topic_post", "", 5, 0, 3, false, true);
- set_context('forums');
-
- echo $forum_topics;
+ $forum = get_entities_from_annotations("object", "groupforumtopic", "group_topic_post", "", 0, $vars['entity']->guid, 4, 0, "asc", false);
+
+ if($forum){
+ foreach($forum as $f){
+
+ $count_annotations = $f->countAnnotations("group_topic_post");
+
+ echo "<div class=\"forum_latest\">";
+ echo "<div class=\"topic_title\"><p>" . $f->title . " (Replies: " . $count_annotations . ")</p></div>";
+ echo "<div class=\"topic_owner_icon\">" . elgg_view('profile/icon',array('entity' => $f->getOwnerEntity(), 'size' => 'tiny')) . "</div>";
+ echo "</div>";
+
+ }
+ }else{
+
+ echo elgg_echo("grouptopic:notcreated");
+ }
?>
\ No newline at end of file |