container_guid); else $user = get_entity($vars['entity']->guid); }else{ $user = page_owner_entity(); } $more_info = ''; //set some variables $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(get_loggedin_user()->getGuid() == page_owner()){ $profile_actions = "
"; $profile_actions .= "username}/edit/details' class='action_button'>". elgg_echo('profile:edit') .""; $profile_actions .= "username}/edit/icon' class='action_button'>". elgg_echo('profile:editicon') .""; $profile_actions .= "
"; }else{ $profile_actions = "
"; if (isloggedin()) { if ($_SESSION['user']->getGUID() != $user->getGUID()) { $ts = time(); $token = generate_action_token($ts); if ($user->isFriend()) { $profile_actions .= "getGUID()}&__elgg_token=$token&__elgg_ts=$ts\" class='action_button'>" . elgg_echo('friend:remove') . ""; } else { $profile_actions .= "getGUID()}&__elgg_token=$token&__elgg_ts=$ts\" class='action_button'>" . elgg_echo('friend:add') . ""; } } } if(is_plugin_enabled('messages')){ $profile_actions .= "guid}\" class='action_button'>". elgg_echo('messages:send') .""; } $profile_actions .= "
"; } $username = $user->username; $email = $user->email; $phone = $user->phone; //get correct links $url = $vars['url']; //if admin display admin links if(isadminloggedin()){ $admin_links = elgg_view('profile/admin_menu'); }else{ $admin_links = ''; } //check tools are enabled if(is_plugin_enabled('file')){ $file_link = "
  • Files
  • "; }else{ $file_link = ""; } if(is_plugin_enabled('blog')){ $blog_link = "
  • Blog
  • "; }else{ $blog_link = ""; } if(is_plugin_enabled('videolist')){ $video_link = "
  • Videos
  • "; }else{ $video_link = ""; } if(is_plugin_enabled('feeds')){ $feeds_link = "
  • Feeds
  • "; }else{ $feeds_link = ""; } if(is_plugin_enabled('pages')){ $pages_link = "
  • Pages
  • "; }else{ $pages_link = ""; } if(is_plugin_enabled('bookmarks')){ $bookmark_link = "
  • Bookmarks
  • "; }else{ $bookmark_link = ""; } //contruct the display $display = <<
    {$icon}
    {$more_info} {$profile_actions} {$admin_links} EOT; echo $display;