aboutsummaryrefslogtreecommitdiff
path: root/views/default/page_elements/owner_block.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/page_elements/owner_block.php')
-rw-r--r--views/default/page_elements/owner_block.php31
1 files changed, 18 insertions, 13 deletions
diff --git a/views/default/page_elements/owner_block.php b/views/default/page_elements/owner_block.php
index ef77d6895..9aef07eef 100644
--- a/views/default/page_elements/owner_block.php
+++ b/views/default/page_elements/owner_block.php
@@ -30,23 +30,28 @@ END;
if(is_plugin_enabled('profile')) {
// Is there a page owner?
$owner = page_owner_entity();
- $location = elgg_view("output/tags",array('value' => $owner->location));
- if ($owner instanceof ElggEntity) {
- $icon = elgg_view("profile/icon",array('entity' => $owner, 'size' => 'tiny'));
- if ($owner instanceof ElggUser || $owner instanceof ElggGroup) {
- $info = '<h3><a href="' . $owner->getURL() . '">' . $owner->name . '</a></h3>';
- }
- $display = "<div class='owner_block_icon'>" . $icon . "</div>";
- $display .= "<div class='owner_block_contents clearfloat'>" . $info;
+ if ($owner instanceof ElggGroup ||
+ ($owner instanceof ElggUser && $owner->getGUID != get_loggedin_userid())
+ ) {
+ $icon = elgg_view('profile/icon', array('entity' => $owner, 'size' => 'tiny'));
+ $owner_url = $owner->getURL();
+ $display = "<div class=\"owner_block_icon\">$icon</div>";
+ $display .= '<div class="owner_block_contents clearfloat">';
+ $display .= "<h3><a href=\"$owner_url\">{$owner->name}</a></h3>";
if ($owner->briefdescription) {
- $desc = $owner->briefdescription;
- $display .= "<p class='profile_info briefdescription'>" . $desc . "</p>";
+ $display .= "<p class=\"profile_info briefdescription\">{$owner->briefdescription}</p>";
}
- $display .= "<p class='profile_info location'>{$location}</p>";
- $display .= "</div>"; // close owner_block_contents
+
+ $location = elgg_view('output/tags', array('value' => $owner->location));
+ $display .= "<p class=\"profile_info location\">$location</p>";
+
+ $display .= elgg_view('owner_block/profile_extend');
+
+ // close owner_block_content
+ $display .= '</div>';
- $contents .= "<div id='owner_block' class='radius8'>".$display."</div>";
+ $contents .= "<div id=\"owner_block\" class=\"radius8\">$display</div>";
}
}