container_guid); } else { $user = get_entity($vars['entity']->guid); } } else { $user = elgg_get_page_owner(); } if (!$user) { // no user so we quit view echo elgg_echo('viewfailure', array(__FILE__)); return TRUE; } $more_info = ''; $location = elgg_view("output/tags",array('value' => $user->location)); $section = $vars['section']; if ($section == 'details') { $icon = elgg_view("profile/icon",array('entity' => $user, 'size' => 'large', 'override' => 'true')); $icon_class = "large"; } else { $icon = elgg_view("profile/icon",array('entity' => $user, 'size' => 'small')); $more_info = "
"; $more_info .= "

{$user->name}

"; $more_info .= "

{$user->briefdescription}

"; $more_info .= "

{$location}

"; $more_info .= "
"; } $profile_actions = ""; if (isloggedin() && (get_loggedin_userid() == elgg_get_page_owner_guid())) { $profile_actions = "
"; $profile_actions .= "". elgg_echo('profile:edit') .""; $profile_actions .= "". elgg_echo('avatar:edit') .""; $profile_actions .= "
"; } else { $profile_actions = "
"; if (isloggedin()) { if (get_loggedin_userid() != $user->getGUID()) { if ($user->isFriend()) { $url = elgg_get_site_url()."action/friends/remove?friend={$user->getGUID()}"; $url = elgg_add_action_tokens_to_url($url); $profile_actions .= "" . elgg_echo('friend:remove') . ""; } else { $url = elgg_get_site_url()."action/friends/add?friend={$user->getGUID()}"; $url = elgg_add_action_tokens_to_url($url); $profile_actions .= "" . elgg_echo('friend:add') . ""; } } } if (is_plugin_enabled('messages') && isloggedin()) { $profile_actions .= "guid}\" class='action-button'>". elgg_echo('messages:send') .""; } $profile_actions .= "
"; } $username = $user->username; $email = $user->email; $phone = $user->phone; //if admin display admin links if (isadminloggedin()) { $admin_links = elgg_view('profile/admin_menu'); } else { $admin_links = ''; } $menu = elgg_view_menu('user_ownerblock', array('user' => elgg_get_page_owner())); //contruct the display $display = <<
{$icon}
{$more_info} {$profile_actions} {$admin_links} EOT; echo $display;