From 567c41286ef9dd28877caee66843be8e42d8d11e Mon Sep 17 00:00:00 2001 From: dave Date: Tue, 25 May 2010 16:40:24 +0000 Subject: only display comment count if there are comments git-svn-id: http://code.elgg.org/elgg/trunk@6208 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/blog/views/default/object/blog.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mod/blog/views/default/object') diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php index 02f74b95e..eee866054 100644 --- a/mod/blog/views/default/object/blog.php +++ b/mod/blog/views/default/object/blog.php @@ -32,7 +32,12 @@ $date = 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); - $comments_link = "getURL()}#annotations\">" . sprintf(elgg_echo("comments"), $comments_count) . ''; + //only display if there are commments + if($comments_count != 0){ + $comments_link = "getURL()}#annotations\">" . elgg_echo("comments") . " (". $comments_count .")"; + }else{ + $comments_link = ''; + } } else { $comments_link = ''; } -- cgit v1.2.3