aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-13 12:33:19 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-13 12:33:19 +0000
commit17592d85d5e632c85cc12dc3f31d23e2acb84065 (patch)
tree1b939a212f0dbb48e1f4c8794069d3e1c6433fd2 /views/default
parent090f60fb6ace958748752e439548f1fa8673258f (diff)
downloadelgg-17592d85d5e632c85cc12dc3f31d23e2acb84065.tar.gz
elgg-17592d85d5e632c85cc12dc3f31d23e2acb84065.tar.bz2
Sturdier enhancement for the owner block.
git-svn-id: https://code.elgg.org/elgg/trunk@1897 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r--views/default/page_elements/owner_block.php23
1 files changed, 13 insertions, 10 deletions
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 "<div id=\"owner_block\">";
+ $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 .= "<div id=\"owner_block_desc\">" . $desc . "</div>";
}
+ $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 <<<END
+ $contents .= <<<END
<div id="owner_block_rss_feed"><a href="{$url}">{$label}</a></div>
<div id="owner_block_odd_feed"><a href="{$url2}">{$label2}</a></div>
@@ -64,30 +64,33 @@ END;
if(is_plugin_enabled('bookmarks')){
$label3 = elgg_echo('bookmarks:this');
- echo "<div id=\"owner_block_bookmark_this\"><a href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/bookmarks/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">{$label3}</a></div>";
+ $contents .= "<div id=\"owner_block_bookmark_this\"><a href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/bookmarks/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">{$label3}</a></div>";
}
//report this button
$label4 = elgg_echo('Report this');
- echo "<div id=\"owner_block_report_this\"><a href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">{$label4}</a></div>";
+ $contents .= "<div id=\"owner_block_report_this\"><a href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">{$label4}</a></div>";
}
- 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 = "<ul>" . $submenu . "</ul>";
if (!empty($submenu))
- echo "<div id=\"owner_block_submenu\">" . $submenu . "</div>"; // plugins can extend this to add menu options
+ $contents .= "<div id=\"owner_block_submenu\">" . $submenu . "</div>"; // plugins can extend this to add menu options
- echo "</div>";
+ if (!empty($contents)) {
+ echo "<div id=\"owner_block\">";
+ echo $contents;
+ echo "</div>";
}
?> \ No newline at end of file