aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default/forum/viewposts.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-11 18:07:26 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-11 18:07:26 +0000
commitbdacb612f3fffa967ef6fda89c081fb7a59894d2 (patch)
treece26e1209d280025645dfca08d36abcacaadaee3 /mod/groups/views/default/forum/viewposts.php
parenta454889d81ed753de06ac6b014ff92ca3c57e039 (diff)
downloadelgg-bdacb612f3fffa967ef6fda89c081fb7a59894d2.tar.gz
elgg-bdacb612f3fffa967ef6fda89c081fb7a59894d2.tar.bz2
Added breadcrumb support and updated the mods with old-style breadcrumbs.
git-svn-id: http://code.elgg.org/elgg/trunk@5366 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views/default/forum/viewposts.php')
-rw-r--r--mod/groups/views/default/forum/viewposts.php77
1 files changed, 35 insertions, 42 deletions
diff --git a/mod/groups/views/default/forum/viewposts.php b/mod/groups/views/default/forum/viewposts.php
index efb7e595c..02ed06b62 100644
--- a/mod/groups/views/default/forum/viewposts.php
+++ b/mod/groups/views/default/forum/viewposts.php
@@ -1,8 +1,8 @@
<?php
- /**
+ /**
* Elgg groups plugin display topic posts
- *
+ *
* @package ElggGroups
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Curverider
@@ -10,55 +10,48 @@
* @link http://elgg.com/
*/
-?>
+ elgg_push_breadcrumb('', 'Parent Group Name');
+ elgg_push_breadcrumb(elgg_echo('item:object:groupforumtopic'), '');
+ elgg_push_breadcrumb($vars['entity']->title);
-<?php
- echo elgg_view('page_elements/breadcrumbs', array(
- 'breadcrumb_root_url' => '',
- 'breadcrumb_root_text' => 'Parent Group Name',
- 'breadcrumb_level1_url' => '#',
- 'breadcrumb_level1_text' => elgg_echo('item:object:groupforumtopic'),
- 'breadcrumb_currentpage' => $vars['entity']->title
- ));
+ echo elgg_view('navigation/breadcrumbs');
-
+ //display follow up comments
+ $count = $vars['entity']->countAnnotations('group_topic_post');
+ $offset = (int) get_input('offset',0);
- //display follow up comments
- $count = $vars['entity']->countAnnotations('group_topic_post');
- $offset = (int) get_input('offset',0);
-
- $baseurl = $vars['url'] . "mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$vars['entity']->container_guid}";
- echo elgg_view('navigation/pagination',array(
- 'limit' => 50,
- 'offset' => $offset,
- 'baseurl' => $baseurl,
- 'count' => $count,
- ));
+ $baseurl = $vars['url'] . "mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$vars['entity']->container_guid}";
+ echo elgg_view('navigation/pagination',array(
+ 'limit' => 50,
+ 'offset' => $offset,
+ 'baseurl' => $baseurl,
+ 'count' => $count,
+ ));
?>
<!-- grab the topic title -->
<h2><?php echo $vars['entity']->title; ?></h2>
<?php
-
- foreach($vars['entity']->getAnnotations('group_topic_post', 50, $offset, "asc") as $post) {
-
- echo elgg_view("forum/topicposts",array('entity' => $post));
-
+
+ foreach($vars['entity']->getAnnotations('group_topic_post', 50, $offset, "asc") as $post) {
+
+ echo elgg_view("forum/topicposts",array('entity' => $post));
+
}
-
+
// check to find out the status of the topic and act
- if($vars['entity']->status != "closed" && page_owner_entity()->isMember($vars['user'])){
-
- //display the add comment form, this will appear after all the existing comments
- echo elgg_view("forms/forums/addpost", array('entity' => $vars['entity']));
-
- } elseif($vars['entity']->status == "closed") {
-
- //this topic has been closed by the owner
- echo "<h2>" . elgg_echo("groups:topicisclosed") . "</h2>";
- echo "<p>" . elgg_echo("groups:topiccloseddesc") . "</p>";
-
- } else {
- }
+ if($vars['entity']->status != "closed" && page_owner_entity()->isMember($vars['user'])){
+
+ //display the add comment form, this will appear after all the existing comments
+ echo elgg_view("forms/forums/addpost", array('entity' => $vars['entity']));
+
+ } elseif($vars['entity']->status == "closed") {
+
+ //this topic has been closed by the owner
+ echo "<h2>" . elgg_echo("groups:topicisclosed") . "</h2>";
+ echo "<p>" . elgg_echo("groups:topiccloseddesc") . "</p>";
+
+ } else {
+ }
?>