From fd4f7ef53452f8ccd1c53b82e6b2cc0c86788e3f Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Tue, 12 Jun 2012 21:56:35 -0400 Subject: Fixes #4567 adds a wire post view --- mod/thewire/pages/thewire/view.php | 30 ++++++++++++++++++++++++++++++ mod/thewire/start.php | 9 ++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 mod/thewire/pages/thewire/view.php diff --git a/mod/thewire/pages/thewire/view.php b/mod/thewire/pages/thewire/view.php new file mode 100644 index 000000000..f45f94bfe --- /dev/null +++ b/mod/thewire/pages/thewire/view.php @@ -0,0 +1,30 @@ +getOwnerEntity(); +if (!$owner) { + forward(); +} + +$title = elgg_echo('thewire:by', array($owner->name)); + +elgg_push_breadcrumb(elgg_echo('thewire'), 'thewire/all'); +elgg_push_breadcrumb($owner->name, 'thewire/owner/' . $owner->username); +elgg_push_breadcrumb($title); + +$content = elgg_view_entity($post); + +$body = elgg_view_layout('content', array( + 'filter' => false, + 'content' => $content, + 'title' => $title, +)); + +echo elgg_view_page($title, $body); diff --git a/mod/thewire/start.php b/mod/thewire/start.php index 5d5786e2f..8e3b5224a 100644 --- a/mod/thewire/start.php +++ b/mod/thewire/start.php @@ -77,7 +77,8 @@ function thewire_init() { * thewire/owner/ View this user's wire posts * thewire/following/ View the posts of those this user follows * thewire/reply/ Reply to a post - * thewire/view/ View a conversation thread + * thewire/view/ View a post + * thewire/thread/ View a conversation thread * thewire/tag/ View wire posts tagged with * * @param array $page From the page_handler function @@ -104,6 +105,12 @@ function thewire_page_handler($page) { include "$base_dir/owner.php"; break; + case "view": + if (isset($page[1])) { + set_input('guid', $page[1]); + } + include "$base_dir/view.php"; + case "thread": if (isset($page[1])) { set_input('thread_id', $page[1]); -- cgit v1.2.3