Support Forum

Comment count in posts is wrong

SO SoWhat
SoWhat
Member

Hi!

In linked comments is always “One comment”. Doesn’t matter if comments are in Mixed or in Seperate mode.

22 Answers

New Answer

SO SoWhat
SoWhat
Member

<?php comments_number(‘No Comment’, ‘One Comment’, ‘% Comments’ );?>

YS Yellow Swordfish
Yellow Swordfish
Member

Well yes – that is WP function.
4.2 has a new template tag – sf_comments_number() which should work. We are still bringing the wiki up to date but you can look at the code for the parameters in:
simple-forum/template-tags/sf-template-tags-comments.php

SO SoWhat
SoWhat
Member

thanks! function works great.

Is there also a function for editing comments?

Like if user is allowed to edit his own posts in forum, it would be cool if he could edit his own comments also.

YS Yellow Swordfish
Yellow Swordfish
Member

Well that’s really a WP function. I guess there may be some plugins that allow it but I am not sure.

YS Yellow Swordfish
Yellow Swordfish
Member

really? That’s a bit restrictive. I guess it just goes to the database and gets the WP standard set. This might have to change as Wp intro custom post types etc… Sorry we can’t help with that.

SO SoWhat
SoWhat
Member

I found other plugins which do that. Will try them out 😉
 

None of them works 🙁 Tested following:

http://wordpress.org/extend/pl…..mments-xt/

http://wordpress.org/extend/pl…..-comments/

http://wordpress.org/extend/pl…..-comments/ (this is the most powerful)

Last one works only on comments which are added when option Show Topic Posts as Comments has been turned off in forum config.

 

Here is example – the first comment was added when comment linking was disabled.

 

YS Yellow Swordfish
Yellow Swordfish
Member

I am not really surprised. They probably all stick to the standard WP way of grabbing comments which s understandable.

SO SoWhat
SoWhat
Member

anyway, It shouldn’t be so hard to modify commenting function and make it work based on the forum, not WordPress capabilities like it is right now. Now only Editors and up can edit their own comments.

SO SoWhat
SoWhat
Member

sorry, it was wrong image 😀

following code is used:

sf_comments_number(‘Nav komentāru’, ‘Viens komentārs’, ‘% komentāri’, true);?>