\n"; } public static function photo_bottom($theme) { $block = new Block; $block->id = "gComments"; $block->title = t("Comments"); $view = new View("comments.html"); $view->comments = ORM::factory("comment") ->where("item_id", $theme->item()->id) ->where("state", "published") ->orderby("created", "ASC") ->find_all(); $block->content = $view; $block->content .= comment::get_add_form($theme->item())->render("form.html"); return $block; } public static function admin_dashboard_blocks($theme) { $block = new Block(); $block->id = "gRecentComments"; $block->title = t("Recent Comments"); $block->content = new View("admin_block_recent_comments.html"); $block->content->comments = ORM::factory("comment")->orderby("created", "DESC")->limit(5)->find_all(); return $block; } }