getOwnerEntity(); $container = $file->getContainerEntity(); $categories = elgg_view('categories/view', $vars); $excerpt = elgg_get_excerpt($file->description); $mime = $file->mimetype; $body = autop($file->description); $owner_icon = elgg_view('profile/icon', array('entity' => $owner, 'size' => 'tiny')); $owner_link = elgg_view('output/url', array( 'href' => "pg/file/owner/$owner->username", 'text' => $owner->name, )); $author_text = elgg_echo('blog:author_by_line', array($owner_link)); if ($file->tags) { $tags = "
"; } else { $tags = ""; } $date = elgg_view_friendly_time($file->time_created); $comments_count = elgg_count_comments($file); //only display if there are commments if ($comments_count != 0) { $text = elgg_echo("comments") . " ($comments_count)"; $comments_link = elgg_view('output/url', array( 'href' => $file->getURL() . '#file-comments', 'text' => $text, )); } else { $comments_link = ''; } $metadata = elgg_view('layout/objects/list/metadata', array( 'entity' => $file, 'handler' => 'file', )); $subtitle = "$author_text $date $categories $comments_link"; // do not show the metadata and controls in widget view if (elgg_in_context('widgets')) { $metadata = ''; } if ($full) { $header = elgg_view_title($file->title); $params = array( 'entity' => $file, 'title' => false, 'metadata' => $metadata, 'subtitle' => $subtitle, 'tags' => $tags, ); $list_body = elgg_view('layout/objects/list/body', $params); $file_info = elgg_view_image_block($owner_icon, $list_body); if (elgg_view_exists('file/specialcontent/' . $mime)) { $blah = "" . $file->title . "
"; echo "getURL()}\">getGUID()}\" border=\"0\" />
"; echo " "; //get the number of comments $numcomments = elgg_count_comments($vars['entity']); if ($numcomments) echo "getURL()}\">" . elgg_echo("comments") . " (" . $numcomments . ")
"; //if the user can edit, display edit and delete links if ($file->canEdit()) { echo ""; echo "getGUID()}\">" . elgg_echo('edit') . " "; echo elgg_view('output/confirmlink',array( 'href' => "action/file/delete?file=" . $file->getGUID(), 'text' => elgg_echo("delete"), 'confirm' => elgg_echo("file:delete:confirm"), 'is_action' => true, )); echo "
{$title}
"; echo "getURL()}\">" . elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $file->thumbnail, 'file_guid' => $file_guid, 'size' => 'large')) . ""; echo " "; //get the number of comments $numcomments = elgg_count_comments($file); if ($numcomments) echo "getURL()}\">" . elgg_echo("comments") . " (" . $numcomments . ")
"; } echo "username}\">{$owner->name} {$friendlytime}"; $numcomments = elgg_count_comments($file); if ($numcomments) $info .= ", getURL()}\">" . elgg_echo("comments") . " (" . $numcomments . ")"; $info .= "
"; $icon = "getURL()}\">" . elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $file->thumbnail, 'file_guid' => $file_guid, 'size' => 'small')) . ""; echo elgg_view_listing($icon, $info); } } else { // Start main version ?>