From 70b08afa64465f4d3457ba6e1c4cc2df1dd2069b Mon Sep 17 00:00:00 2001 From: brettp Date: Fri, 16 Oct 2009 20:41:31 +0000 Subject: More views cleanup. git-svn-id: http://code.elgg.org/elgg/trunk@3556 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/page_elements/owner_block.php | 189 ++++++++++++++-------------- 1 file changed, 92 insertions(+), 97 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 535d1b064..46397c4c2 100644 --- a/views/default/page_elements/owner_block.php +++ b/views/default/page_elements/owner_block.php @@ -1,100 +1,95 @@ $owner, 'size' => 'tiny')); + if ($owner instanceof ElggUser || $owner instanceof ElggGroup) { + //$info = $owner->name; + $info = '' . $owner->name . ''; + } + $display = "
" . $icon . "
"; + $display .= "
" . $info . "
"; + + if ($owner->briefdescription) { + $desc = $owner->briefdescription; + $display .= "
" . $desc . "
"; + } + + $contents .= $display; +} + +// Are there feeds to display? +global $autofeed; + +if (isset($autofeed) && $autofeed == true) { + $url = $url2 = full_url(); + if (substr_count($url,'?')) { + $url .= "&view=rss"; + } 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 .= <<{$label} - /** - * Elgg owner block - * Displays page ownership information - * - * @package Elgg - * @subpackage Core - - * @author Curverider Ltd - - * @link http://elgg.org/ - * - */ - - $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 = '' . $owner->name . ''; - } - $display = "
" . $icon . "
"; - $display .= "
" . $info . "
"; - - if ($owner->briefdescription) { - $desc = $owner->briefdescription; - $display .= "
" . $desc . "
"; - } - - $contents .= $display; - } - - // Are there feeds to display? - global $autofeed; - - if (isset($autofeed) && $autofeed == true) { - $url = $url2 = full_url(); - if (substr_count($url,'?')) { - $url .= "&view=rss"; - } 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 .= <<{$label} - 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 .= ""; - - } - - //report this button - if (is_plugin_enabled('reportedcontent')) - { - $label4 = elgg_echo('reportedcontent:report'); - $contents .= ""; - } - - } - - - $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'); - if (!empty($submenu)) - $contents .= "
" . $submenu . "
"; // plugins can extend this to add menu options - - if (!empty($contents)) { - echo "
"; - echo $contents; - echo "
"; - } - -?> \ No newline at end of file +} + +//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 .= ""; + + } + + //report this button + if (is_plugin_enabled('reportedcontent')) + { + $label4 = elgg_echo('reportedcontent:report'); + $contents .= ""; + } + +} + + +$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'); +if (!empty($submenu)) + $contents .= "
" . $submenu . "
"; // plugins can extend this to add menu options + +if (!empty($contents)) { + echo "
"; + echo $contents; + echo "
"; +} \ No newline at end of file -- cgit v1.2.3