diff options
author | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-25 16:40:24 +0000 |
---|---|---|
committer | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-25 16:40:24 +0000 |
commit | 567c41286ef9dd28877caee66843be8e42d8d11e (patch) | |
tree | b9823ca3c366357f83f7840bab373e8f5cb06237 /mod/blog/views/default | |
parent | da06558a9b72618658d09bc13dd8b399bc9d93a4 (diff) | |
download | elgg-567c41286ef9dd28877caee66843be8e42d8d11e.tar.gz elgg-567c41286ef9dd28877caee66843be8e42d8d11e.tar.bz2 |
only display comment count if there are comments
git-svn-id: http://code.elgg.org/elgg/trunk@6208 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/blog/views/default')
-rw-r--r-- | mod/blog/views/default/object/blog.php | 7 |
1 files changed, 6 insertions, 1 deletions
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 = "<a href=\"{$blog->getURL()}#annotations\">" . sprintf(elgg_echo("comments"), $comments_count) . '</a>'; + //only display if there are commments + if($comments_count != 0){ + $comments_link = "<a href=\"{$blog->getURL()}#annotations\">" . elgg_echo("comments") . " (". $comments_count .")</a>"; + }else{ + $comments_link = ''; + } } else { $comments_link = ''; } |