From e22e23e930ecac79489b9d20dc07eb8d7b3ac637 Mon Sep 17 00:00:00 2001 From: nickw Date: Tue, 1 Jun 2010 15:13:10 +0000 Subject: Restricting tag cloud display on Blogs and Documents by context. git-svn-id: http://code.elgg.org/elgg/trunk@6306 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/blog/start.php | 4 +++- mod/blog/views/default/blog/sidebar_menu.php | 9 ++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/mod/blog/start.php b/mod/blog/start.php index 9c604b756..6b9f500a2 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -153,7 +153,9 @@ function blog_page_handler($page) { $sidebar = isset($content_info['sidebar']) ? $content_info['sidebar'] : ''; - $sidebar .= elgg_view('blog/sidebar_menu'); + $sidebar .= elgg_view('blog/sidebar_menu', array( + 'page' => isset($page[1]) ? $page[1] : FALSE, + )); $content = elgg_view('navigation/breadcrumbs') . $content_info['content']; diff --git a/mod/blog/views/default/blog/sidebar_menu.php b/mod/blog/views/default/blog/sidebar_menu.php index aa43ed08e..8051463b5 100644 --- a/mod/blog/views/default/blog/sidebar_menu.php +++ b/mod/blog/views/default/blog/sidebar_menu.php @@ -60,7 +60,10 @@ if ($page_owner) { echo ''; } + + // friends page lists all tags; mine lists owner's + $owner_guid = ($vars['page'] == 'friends') ? '' : $page_owner->getGUID(); + echo display_tagcloud(0, 50, 'tags', 'object', 'blog', $owner_guid); +} else { + echo display_tagcloud(0, 50, 'tags', 'object', 'blog'); } - -// tag-cloud display -echo display_tagcloud(0, 50, 'tags'); -- cgit v1.2.3