getOwnerEntity(); $container = $blog->getContainerEntity(); $categories = elgg_view('categories/view', $vars); $excerpt = $blog->excerpt; $owner_icon = elgg_view('profile/icon', array('entity' => $owner, 'size' => 'tiny')); $owner_link = elgg_view('output/url', array( 'href' => "pg/blog/owner/$owner->username", 'text' => $owner->name, )); $author_text = elgg_echo('blog:author_by_line', array($owner_link)); if ($blog->tags) { $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 = elgg_view('output/url', array( 'href' => $blog->getURL() . '#blog-comments', 'text' => $text, )); } else { $comments_link = ''; } } else { $comments_link = ''; } // access is always shown. $metadata = ' '; $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) { $body = elgg_view('output/longtext', array( 'value' => $blog->description, 'class' => 'blog-post', )); $header = elgg_view_title($blog->title); $params = array( 'entity' => $blog, 'title' => false, 'metadata' => $metadata, 'subtitle' => $subtitle, 'tags' => $tags, ); $list_body = elgg_view('layout/objects/list/body', $params); $blog_info = elgg_view_image_block($owner_icon, $list_body); echo << $blog, 'metadata' => $metadata, 'subtitle' => $subtitle, 'tags' => $tags, 'content' => $excerpt, ); $list_body = elgg_view('layout/objects/list/body', $params); echo elgg_view_image_block($owner_icon, $list_body); }