From 01435072dc7d9b46bc30a3216501684a72e716a1 Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 18 Mar 2011 01:31:22 +0000 Subject: Refs #3158 namespaced pages for bookmarks and thewire git-svn-id: http://code.elgg.org/elgg/trunk@8759 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/bookmarks/pages/add.php | 23 ------------- mod/bookmarks/pages/all.php | 28 ---------------- mod/bookmarks/pages/bookmarklet.php | 36 -------------------- mod/bookmarks/pages/bookmarks/add.php | 23 +++++++++++++ mod/bookmarks/pages/bookmarks/all.php | 28 ++++++++++++++++ mod/bookmarks/pages/bookmarks/bookmarklet.php | 36 ++++++++++++++++++++ mod/bookmarks/pages/bookmarks/edit.php | 31 ++++++++++++++++++ mod/bookmarks/pages/bookmarks/friends.php | 28 ++++++++++++++++ mod/bookmarks/pages/bookmarks/owner.php | 47 +++++++++++++++++++++++++++ mod/bookmarks/pages/bookmarks/view.php | 34 +++++++++++++++++++ mod/bookmarks/pages/edit.php | 31 ------------------ mod/bookmarks/pages/friends.php | 28 ---------------- mod/bookmarks/pages/owner.php | 47 --------------------------- mod/bookmarks/pages/view.php | 34 ------------------- 14 files changed, 227 insertions(+), 227 deletions(-) delete mode 100644 mod/bookmarks/pages/add.php delete mode 100644 mod/bookmarks/pages/all.php delete mode 100644 mod/bookmarks/pages/bookmarklet.php create mode 100644 mod/bookmarks/pages/bookmarks/add.php create mode 100644 mod/bookmarks/pages/bookmarks/all.php create mode 100644 mod/bookmarks/pages/bookmarks/bookmarklet.php create mode 100644 mod/bookmarks/pages/bookmarks/edit.php create mode 100644 mod/bookmarks/pages/bookmarks/friends.php create mode 100644 mod/bookmarks/pages/bookmarks/owner.php create mode 100644 mod/bookmarks/pages/bookmarks/view.php delete mode 100644 mod/bookmarks/pages/edit.php delete mode 100644 mod/bookmarks/pages/friends.php delete mode 100644 mod/bookmarks/pages/owner.php delete mode 100644 mod/bookmarks/pages/view.php (limited to 'mod/bookmarks/pages') diff --git a/mod/bookmarks/pages/add.php b/mod/bookmarks/pages/add.php deleted file mode 100644 index c7fd3cf79..000000000 --- a/mod/bookmarks/pages/add.php +++ /dev/null @@ -1,23 +0,0 @@ - '', - 'buttons' => '', - 'content' => $content, - 'title' => $title, -)); - -echo elgg_view_page($title, $body); \ No newline at end of file diff --git a/mod/bookmarks/pages/all.php b/mod/bookmarks/pages/all.php deleted file mode 100644 index 07ae5d327..000000000 --- a/mod/bookmarks/pages/all.php +++ /dev/null @@ -1,28 +0,0 @@ - 'object', - 'subtype' => 'bookmarks', - 'limit' => 10, - 'offset' => $offset, - 'full_view' => false, - 'view_toggle_type' => false -)); - -$title = elgg_echo('bookmarks:everyone'); - -$body = elgg_view_layout('content', array( - 'filter_context' => 'all', - 'content' => $content, - 'title' => $title -)); - -echo elgg_view_page($title, $body); \ No newline at end of file diff --git a/mod/bookmarks/pages/bookmarklet.php b/mod/bookmarks/pages/bookmarklet.php deleted file mode 100644 index 99866e385..000000000 --- a/mod/bookmarks/pages/bookmarklet.php +++ /dev/null @@ -1,36 +0,0 @@ -getContainerEntity(); -} - -elgg_set_page_owner_guid($page_owner->getGUID()); - -$title = elgg_echo('bookmarks:bookmarklet'); - -if ($page_owner instanceof ElggGroup) { - elgg_push_breadcrumb($page_owner->name, $page_owner->getURL()); -} - -elgg_push_breadcrumb($title); - -$content = elgg_view("bookmarks/bookmarklet"); - -$body = elgg_view_layout('content', array( - 'content' => $content, - 'title' => $title, - 'filter' => false -)); - -echo elgg_view_page($title, $body); \ No newline at end of file diff --git a/mod/bookmarks/pages/bookmarks/add.php b/mod/bookmarks/pages/bookmarks/add.php new file mode 100644 index 000000000..c7fd3cf79 --- /dev/null +++ b/mod/bookmarks/pages/bookmarks/add.php @@ -0,0 +1,23 @@ + '', + 'buttons' => '', + 'content' => $content, + 'title' => $title, +)); + +echo elgg_view_page($title, $body); \ No newline at end of file diff --git a/mod/bookmarks/pages/bookmarks/all.php b/mod/bookmarks/pages/bookmarks/all.php new file mode 100644 index 000000000..07ae5d327 --- /dev/null +++ b/mod/bookmarks/pages/bookmarks/all.php @@ -0,0 +1,28 @@ + 'object', + 'subtype' => 'bookmarks', + 'limit' => 10, + 'offset' => $offset, + 'full_view' => false, + 'view_toggle_type' => false +)); + +$title = elgg_echo('bookmarks:everyone'); + +$body = elgg_view_layout('content', array( + 'filter_context' => 'all', + 'content' => $content, + 'title' => $title +)); + +echo elgg_view_page($title, $body); \ No newline at end of file diff --git a/mod/bookmarks/pages/bookmarks/bookmarklet.php b/mod/bookmarks/pages/bookmarks/bookmarklet.php new file mode 100644 index 000000000..99866e385 --- /dev/null +++ b/mod/bookmarks/pages/bookmarks/bookmarklet.php @@ -0,0 +1,36 @@ +getContainerEntity(); +} + +elgg_set_page_owner_guid($page_owner->getGUID()); + +$title = elgg_echo('bookmarks:bookmarklet'); + +if ($page_owner instanceof ElggGroup) { + elgg_push_breadcrumb($page_owner->name, $page_owner->getURL()); +} + +elgg_push_breadcrumb($title); + +$content = elgg_view("bookmarks/bookmarklet"); + +$body = elgg_view_layout('content', array( + 'content' => $content, + 'title' => $title, + 'filter' => false +)); + +echo elgg_view_page($title, $body); \ No newline at end of file diff --git a/mod/bookmarks/pages/bookmarks/edit.php b/mod/bookmarks/pages/bookmarks/edit.php new file mode 100644 index 000000000..24513a960 --- /dev/null +++ b/mod/bookmarks/pages/bookmarks/edit.php @@ -0,0 +1,31 @@ +canEdit()) { + register_error(elgg_echo('bookmarks:unknown_bookmark')); + forward(REFERRER); +} + +$page_owner = elgg_get_page_owner_entity(); + +$title = elgg_echo('bookmarks:edit'); +elgg_push_breadcrumb($title); + +$vars = bookmarks_prepare_form_vars($bookmark); +$content = elgg_view_form('bookmarks/save', array(), $vars); + +$body = elgg_view_layout('content', array( + 'filter' => '', + 'buttons' => '', + 'content' => $content, + 'title' => $title, +)); + +echo elgg_view_page($title, $body); \ No newline at end of file diff --git a/mod/bookmarks/pages/bookmarks/friends.php b/mod/bookmarks/pages/bookmarks/friends.php new file mode 100644 index 000000000..6e3f77cf6 --- /dev/null +++ b/mod/bookmarks/pages/bookmarks/friends.php @@ -0,0 +1,28 @@ +name, "bookmarks/owner/$owner->username"); +elgg_push_breadcrumb(elgg_echo('friends')); + +$title = elgg_echo('bookmarks:friends'); + +$content = list_user_friends_objects($owner->guid, 'bookmarks', 10, false); +if (!$content) { + $content = elgg_echo('bookmarks:none'); +} + +$params = array( + 'filter_context' => 'friends', + 'content' => $content, + 'title' => $title, +); + +$body = elgg_view_layout('content', $params); + +echo elgg_view_page($title, $body); \ No newline at end of file diff --git a/mod/bookmarks/pages/bookmarks/owner.php b/mod/bookmarks/pages/bookmarks/owner.php new file mode 100644 index 000000000..d1564f751 --- /dev/null +++ b/mod/bookmarks/pages/bookmarks/owner.php @@ -0,0 +1,47 @@ +name); + +$offset = (int)get_input('offset', 0); +$content .= elgg_list_entities(array( + 'type' => 'object', + 'subtype' => 'bookmarks', + 'container_guid' => $page_owner->guid, + 'limit' => 10, + 'offset' => $offset, + 'full_view' => false, + 'view_toggle_type' => false +)); + +if (!$content) { + $content = elgg_echo('bookmarks:none'); +} + +$title = elgg_echo('bookmarks:owner', array($page_owner->name)); + +$filter_context = ''; +if ($page_owner->getGUID() == elgg_get_logged_in_user_guid()) { + $filter_context = 'mine'; +} + +$vars = array( + 'filter_context' => $filter_context, + 'content' => $content, + 'title' => $title +); + +// don't show filter if out of filter context +if ($page_owner instanceof ElggGroup) { + $vars['filter'] = false; +} + +$body = elgg_view_layout('content', $vars); + +echo elgg_view_page($title, $body); \ No newline at end of file diff --git a/mod/bookmarks/pages/bookmarks/view.php b/mod/bookmarks/pages/bookmarks/view.php new file mode 100644 index 000000000..142e0b246 --- /dev/null +++ b/mod/bookmarks/pages/bookmarks/view.php @@ -0,0 +1,34 @@ +name; + +if (elgg_instanceof($page_owner, 'group')) { + elgg_push_breadcrumb($crumbs_title, "bookmarks/group/$page_owner->guid/owner"); +} else { + elgg_push_breadcrumb($crumbs_title, "bookmarks/owner/$page_owner->username"); +} + +$title = $bookmark->title; + +elgg_push_breadcrumb($title); + +$content = elgg_view_entity($bookmark, true); +$content .= elgg_view_comments($bookmark); + +$body = elgg_view_layout('content', array( + 'content' => $content, + 'title' => $title, + 'filter' => '', + 'header' => '', +)); + +echo elgg_view_page($title, $body); diff --git a/mod/bookmarks/pages/edit.php b/mod/bookmarks/pages/edit.php deleted file mode 100644 index 24513a960..000000000 --- a/mod/bookmarks/pages/edit.php +++ /dev/null @@ -1,31 +0,0 @@ -canEdit()) { - register_error(elgg_echo('bookmarks:unknown_bookmark')); - forward(REFERRER); -} - -$page_owner = elgg_get_page_owner_entity(); - -$title = elgg_echo('bookmarks:edit'); -elgg_push_breadcrumb($title); - -$vars = bookmarks_prepare_form_vars($bookmark); -$content = elgg_view_form('bookmarks/save', array(), $vars); - -$body = elgg_view_layout('content', array( - 'filter' => '', - 'buttons' => '', - 'content' => $content, - 'title' => $title, -)); - -echo elgg_view_page($title, $body); \ No newline at end of file diff --git a/mod/bookmarks/pages/friends.php b/mod/bookmarks/pages/friends.php deleted file mode 100644 index 6e3f77cf6..000000000 --- a/mod/bookmarks/pages/friends.php +++ /dev/null @@ -1,28 +0,0 @@ -name, "bookmarks/owner/$owner->username"); -elgg_push_breadcrumb(elgg_echo('friends')); - -$title = elgg_echo('bookmarks:friends'); - -$content = list_user_friends_objects($owner->guid, 'bookmarks', 10, false); -if (!$content) { - $content = elgg_echo('bookmarks:none'); -} - -$params = array( - 'filter_context' => 'friends', - 'content' => $content, - 'title' => $title, -); - -$body = elgg_view_layout('content', $params); - -echo elgg_view_page($title, $body); \ No newline at end of file diff --git a/mod/bookmarks/pages/owner.php b/mod/bookmarks/pages/owner.php deleted file mode 100644 index d1564f751..000000000 --- a/mod/bookmarks/pages/owner.php +++ /dev/null @@ -1,47 +0,0 @@ -name); - -$offset = (int)get_input('offset', 0); -$content .= elgg_list_entities(array( - 'type' => 'object', - 'subtype' => 'bookmarks', - 'container_guid' => $page_owner->guid, - 'limit' => 10, - 'offset' => $offset, - 'full_view' => false, - 'view_toggle_type' => false -)); - -if (!$content) { - $content = elgg_echo('bookmarks:none'); -} - -$title = elgg_echo('bookmarks:owner', array($page_owner->name)); - -$filter_context = ''; -if ($page_owner->getGUID() == elgg_get_logged_in_user_guid()) { - $filter_context = 'mine'; -} - -$vars = array( - 'filter_context' => $filter_context, - 'content' => $content, - 'title' => $title -); - -// don't show filter if out of filter context -if ($page_owner instanceof ElggGroup) { - $vars['filter'] = false; -} - -$body = elgg_view_layout('content', $vars); - -echo elgg_view_page($title, $body); \ No newline at end of file diff --git a/mod/bookmarks/pages/view.php b/mod/bookmarks/pages/view.php deleted file mode 100644 index 142e0b246..000000000 --- a/mod/bookmarks/pages/view.php +++ /dev/null @@ -1,34 +0,0 @@ -name; - -if (elgg_instanceof($page_owner, 'group')) { - elgg_push_breadcrumb($crumbs_title, "bookmarks/group/$page_owner->guid/owner"); -} else { - elgg_push_breadcrumb($crumbs_title, "bookmarks/owner/$page_owner->username"); -} - -$title = $bookmark->title; - -elgg_push_breadcrumb($title); - -$content = elgg_view_entity($bookmark, true); -$content .= elgg_view_comments($bookmark); - -$body = elgg_view_layout('content', array( - 'content' => $content, - 'title' => $title, - 'filter' => '', - 'header' => '', -)); - -echo elgg_view_page($title, $body); -- cgit v1.2.3