* @copyright Curverider Ltd 2008-2010 * @link http://elgg.com/ * * @uses $vars['entity'] Optionally, the blog post to view */ if (isset($vars['entity'])) { //display comments link? if ($vars['entity']->comments_on == 'Off') { $comments_on = false; } else { $comments_on = true; } if (get_context() == "search" && $vars['entity'] instanceof ElggObject) { //display the correct layout depending on gallery or list view if (get_input('search_viewtype') == "gallery") { //display the gallery view echo elgg_view("blog/gallery",$vars); } else { echo elgg_view("blog/listing",$vars); } } else { if ($vars['entity'] instanceof ElggObject) { $url = $vars['entity']->getURL(); $owner = $vars['entity']->getOwnerEntity(); $canedit = $vars['entity']->canEdit(); } else { $url = 'javascript:history.go(-1);'; $owner = $vars['user']; $canedit = false; } ?>