By Justin on Sunday, 29 September 2013
Posted in General Issues
Replies 6
Likes 0
Views 1.5K
Votes 0
Hi there,

When using Komento, I've noticed that when there a zero comments in an K2 item, it shows as "0 Comment" instead of "0 Comments". Also, when there's only one comment, it shows as "1 Comments" when it should actually show "1 Comment". Is that a tough fix, or is there an easy patch for that.

Thanks in advance!
Hi Mark,

Here's an example of "0 Comment" near the top of the page.

http://www.earlysgarden.com/science-diet-sale

------------------------------------

Here's an example of "1 Comments" in the Komento area itself:

http://www.earlysgarden.com/earlys-frequent-buyer-program#itemCommentsAnchor
·
Saturday, 09 November 2013 00:33
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

Go to the file at /components/com_komento/themes/freso/comment/tools.php

replace line 45 from:

<?php echo JText::_( 'COM_KOMENTO_COMMENTS' ); ?>


to:

<?php echo $commentCount > 1 ? 'comments' : 'comment'; ?>
·
Saturday, 09 November 2013 16:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Jason,

That fixed the second issue. Now the only one left is the "0 Comment" in the page's k2 tool bar header:

http://www.earlysgarden.com/science-diet-sale
·
Saturday, 09 November 2013 21:37
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

Unfortunately that section's text is not controlled by Komento, What Komento does is tell K2 the number of comments we have, and K2 renders it.
·
Tuesday, 12 November 2013 11:00
·
0 Likes
·
0 Votes
·
0 Comments
·
I believe when using the default K2 comments, when there are no comments in the k2 item itself, it normally says "Be the first to comment!"
·
Tuesday, 12 November 2013 17:37
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

Yes and as mentioned, what Komento does is just provide the number of comments to K2 (this is in the official K2 API), and K2 renders it based on the counter that 3rd party provided.
·
Tuesday, 12 November 2013 17:41
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post