From 17592d85d5e632c85cc12dc3f31d23e2acb84065 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 13 Aug 2008 12:33:19 +0000 Subject: Sturdier enhancement for the owner block. git-svn-id: https://code.elgg.org/elgg/trunk@1897 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/page_elements/owner_block.php | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'views/default/page_elements/owner_block.php') diff --git a/views/default/page_elements/owner_block.php b/views/default/page_elements/owner_block.php index e16d03d4e..d8ad2e069 100644 --- a/views/default/page_elements/owner_block.php +++ b/views/default/page_elements/owner_block.php @@ -13,8 +13,8 @@ * */ - if (page_owner()) { - echo "
"; + $contents = ""; + // Is there a page owner? if ($owner = page_owner_entity()) { $icon = elgg_view("profile/icon",array('entity' => $owner, 'size' => 'tiny')); @@ -29,8 +29,8 @@ $display .= "
" . $desc . "
"; } + $contents .= $display; } - echo $display; // Are there feeds to display? global $autofeed; @@ -49,7 +49,7 @@ } $label = elgg_echo('feed:rss'); $label2 = elgg_echo('feed:odd'); - echo <<{$label}
{$label2}
@@ -64,30 +64,33 @@ END; if(is_plugin_enabled('bookmarks')){ $label3 = elgg_echo('bookmarks:this'); - echo "
wwwroot . "mod/bookmarks/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">{$label3}
"; + $contents .= "
wwwroot . "mod/bookmarks/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">{$label3}
"; } //report this button $label4 = elgg_echo('Report this'); - echo "
wwwroot . "mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">{$label4}
"; + $contents .= "
wwwroot . "mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">{$label4}
"; } - echo elgg_view('owner_block/extend'); + $contents .= elgg_view('owner_block/extend'); // Have we been asked to inject any content? If so, display it if (isset($vars['content'])) - echo $vars['content']; + $contets .= $vars['content']; // Initialise the submenu $submenu = get_submenu(); // elgg_view('canvas_header/submenu'); if (!empty($submenu)) $submenu = ""; if (!empty($submenu)) - echo "
" . $submenu . "
"; // plugins can extend this to add menu options + $contents .= "
" . $submenu . "
"; // plugins can extend this to add menu options - echo ""; + if (!empty($contents)) { + echo "
"; + echo $contents; + echo "
"; } ?> \ No newline at end of file -- cgit v1.2.3