Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
  • Register
Welcome to the Q&A for Question2Answer.

If you have questions about the platform, click here to ask and please use English.

If you just want to try Q2A, please use the demo, which also grants admin access.

Apr 29: Q2A 1.5.2

number comment in question...

+3 votes
Brain Q2A, is it possible to do so in order to be seen not only as responses to the question was left, but the number left a comment in question?! very necessary, but not as something he can not think of ... : ( attached picture for the general notion ...

http://imagepost.ru/?v=ce28f.gif
asked Oct 12, 2011 in Q2A Core by mattia
edited Oct 12, 2011 by mattia

2 Answers

+2 votes
 
Best answer

Here's a plugin that does it:

https://github.com/NoahY/q2a-comment-count

and here's a screenshot:

answered Oct 18, 2011 by NoahY
selected Oct 19, 2011 by mattia
NoahY, thank you very much, do you brain=))
You're welcome :) gotta love Google Translate...
+1 vote
Here's how you get all comments:

            $comments = qa_db_read_one_value(
                qa_db_query_sub(
                    "SELECT COUNT(postid) FROM ^posts WHERE (parentid=# OR parentid IN (SELECT postid FROM ^posts WHERE parentid=#)) AND type='C'",
                    $postid,$postid
                )
            );
            
Then all you need to do is run this over each q_list_item and change the output accordingly.
answered Oct 13, 2011 by NoahY
NoahY, in which file and line of code to write?
create a custom layer:

http://www.question2answer.org/layers.php