diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-12-09 12:54:11 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-12-09 12:54:11 +0000 |
commit | 38590ee868c00a2e5c73b38abafc2152a60a24ee (patch) | |
tree | 7c767ff3658e23f1074578a9090ca762f0bac181 /views/default/page_elements | |
parent | ef14e5afe22128c8ef60c13036f4a43370e2e22c (diff) | |
download | elgg-38590ee868c00a2e5c73b38abafc2152a60a24ee.tar.gz elgg-38590ee868c00a2e5c73b38abafc2152a60a24ee.tar.bz2 |
fixes #973 - pulls reported content and bookmark code out of core owner_block view - left images in _graphics since themes probably depend on that and did not want to break themes
git-svn-id: http://code.elgg.org/elgg/trunk@3745 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/page_elements')
-rw-r--r-- | views/default/page_elements/owner_block.php | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/views/default/page_elements/owner_block.php b/views/default/page_elements/owner_block.php index 46397c4c2..1a3440135 100644 --- a/views/default/page_elements/owner_block.php +++ b/views/default/page_elements/owner_block.php @@ -14,11 +14,9 @@ $contents = ""; // Is there a page owner? $owner = page_owner_entity(); -// if (!$owner && isloggedin()) $owner = $_SESSION['user']; if ($owner instanceof ElggEntity) { $icon = elgg_view("profile/icon",array('entity' => $owner, 'size' => 'tiny')); if ($owner instanceof ElggUser || $owner instanceof ElggGroup) { - //$info = $owner->name; $info = '<a href="' . $owner->getURL() . '">' . $owner->name . '</a>'; } $display = "<div id=\"owner_block_icon\">" . $icon . "</div>"; @@ -42,13 +40,7 @@ if (isset($autofeed) && $autofeed == true) { } else { $url .= "?view=rss"; } - //if (substr_count($url2,'?')) { - // $url2 .= "&view=odd"; - //} else { - // $url2 .= "?view=opendd"; - //} $label = elgg_echo('feed:rss'); - //$label2 = elgg_echo('feed:odd'); $contents .= <<<END <div id="owner_block_rss_feed"><a href="{$url}" rel="nofollow">{$label}</a></div> @@ -56,37 +48,17 @@ if (isset($autofeed) && $autofeed == true) { END; } -//the follow are for logged in users only -if(isloggedin()){ - - //is the bookmark plugin installed? - if(is_plugin_enabled('bookmarks')){ - - $label3 = elgg_echo('bookmarks:this'); - $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 - if (is_plugin_enabled('reportedcontent')) - { - $label4 = elgg_echo('reportedcontent:report'); - $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>"; - } - -} - - $contents .= elgg_view('owner_block/extend'); + // Have we been asked to inject any content? If so, display it if (isset($vars['content'])) $contents .= $vars['content']; -// Initialise the submenu -$submenu = get_submenu(); // elgg_view('canvas_header/submenu'); +// Initialise the submenu (plugins can add to the submenu) +$submenu = get_submenu(); if (!empty($submenu)) - $contents .= "<div id=\"owner_block_submenu\">" . $submenu . "</div>"; // plugins can extend this to add menu options + $contents .= "<div id=\"owner_block_submenu\">" . $submenu . "</div>"; if (!empty($contents)) { echo "<div id=\"owner_block\">"; |