owner_guid); $container = get_entity($blog->container_guid); $linked_title = "getURL()}\" title=\"" . htmlentities($blog->title) . "\">{$blog->title}"; $categories = elgg_view('categories/view', $vars); $excerpt = $blog->excerpt; $body = autop($blog->description); $owner_icon = elgg_view('profile/icon', array('entity' => $owner, 'size' => 'tiny')); $owner_blog_link = "username\">{$owner->name}"; $author_text = elgg_echo('blog:author_by_line', array($owner_blog_link)); if ($blog->tags) { $tags = "

" . elgg_view('output/tags', array('tags' => $blog->tags)) . "

"; } else { $tags = ""; } $date = elgg_view_friendly_time($blog->publish_date); // The "on" status changes for comments, so best to check for !Off if ($blog->comments_on != 'Off') { $comments_count = elgg_count_comments($blog); //only display if there are commments if ($comments_count != 0) { $text = elgg_echo("comments") . " ($comments_count)"; $comments_link = "getURL()}#annotations\">$text"; } else { $comments_link = ''; } } else { $comments_link = ''; } // access is always shown. $edit = elgg_view('output/access', array('entity' => $vars['entity'])); // links to delete or edit. if ($blog->canEdit()) { $edit_url = elgg_get_site_url()."pg/blog/edit/{$owner->username}/{$blog->getGUID()}/"; $edit_link = "" . elgg_echo('edit') . ''; $delete_url = "action/blog/delete?guid={$blog->getGUID()}"; $delete_link = "" . elgg_view('output/confirmlink', array( 'href' => $delete_url, 'text' => elgg_echo('delete'), 'confirm' => elgg_echo('deleteconfirm') )) . ""; $status = ''; if ($blog->status != 'published') { $status_text = elgg_echo("blog:status:{$blog->status}"); $status = "$status_text"; } $edit .= "$status $edit_link $delete_link"; } // include a view for plugins to extend $edit = elgg_view("blogs/options", array("object_type" => 'blog', 'entity' => $blog)) . elgg_view_likes($blog) . $edit; if ($full) { $params = array( 'title' => $blog->title, 'buttons' => '', ); $header = elgg_view('content/header', $params); $info = <<
$edit

$author_text $date $categories $comments_link

$tags HTML; $blog_info = elgg_view_media($owner_icon, $info); echo << $body HTML; } else { // brief view $body = <<
$edit

$linked_title

$author_text $date $categories $comments_link

$tags

$excerpt

HTML; echo elgg_view_media($owner_icon, $body); }