From 02a52af62e1579ad174b1160071b82ec11ee31e3 Mon Sep 17 00:00:00 2001 From: brettp Date: Sat, 19 Feb 2011 19:31:34 +0000 Subject: Refs #2916. More cleanup of the messageboard widget. git-svn-id: http://code.elgg.org/elgg/trunk@8344 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/messageboard/pages/owner.php | 58 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 mod/messageboard/pages/owner.php (limited to 'mod/messageboard/pages') diff --git a/mod/messageboard/pages/owner.php b/mod/messageboard/pages/owner.php new file mode 100644 index 000000000..7a65ec68b --- /dev/null +++ b/mod/messageboard/pages/owner.php @@ -0,0 +1,58 @@ +name, $page_owner->getURL()); + +$options = array( + 'annotations_name' => 'messageboard', + 'guid' => $page_owner_guid, + 'limit' => 10 +); + +if ($history_user) { + $options['annotations_owner_guid'] = $history_user->getGUID(); + $title = elgg_echo('messageboard:owner_history', array($history_user->name, $page_owner->name)); + + if ($page_owner instanceof ElggGroup) { + $mb_url = "pg/messageboard/group/$page_owner->guid/owner"; + } else { + $mb_url = "pg/messageboard/owner/$page_owner->username"; + } +} else { + $title = elgg_echo('messageboard:owner', array($page_owner->name)); + $mb_url = ''; +} + +elgg_push_breadcrumb(elgg_echo('messageboard:board'), $mb_url); + +if ($history_user) { + elgg_push_breadcrumb($history_user->name); +} + +$content = elgg_list_annotations($options); + +if (!$content) { + $content = elgg_echo('messageboard:none'); +} + +$vars = array( + 'filter' => false, + 'buttons' => false, + 'content' => $content, + 'title' => $title, + 'reverse_order_by' => true +); + +$body = elgg_view_layout('content', $vars); + +echo elgg_view_page($title, $body); \ No newline at end of file -- cgit v1.2.3