Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
971 views
in Q2A Core by

Hi, Ive turned one of my sites into a disscussion type of site and would like to know how to remove the answer count from the user page.

I would like to completly remove this line al together if this is possible please!

Thanks

by
Because program source about user are different according to Q2A version(1.5.x -> 1.6dev -> 1.6beta), you should write Q2A version when you ask a question.

2 Answers

0 votes
by

Easiest way to do is adding rule to your stylesheet.

.qa-template-user tr#answers{display: none} //just to make sure it's id not a class

done...

by
Hey thanks but that didn't seem to work for me. But i located 'answers' => array inside of qa-page-user-profile.php and removed
-------------------
'answers' => array(
                'type' => 'static',
                'label' => qa_lang_html('profile/answers'),
                'value' => '<SPAN CLASS="qa-uf-user-a-posts">'.qa_html(number_format(@$userpoints['aposts'])).'</SPAN>',
            ),
---------------
This worked well but not sure if this is the right think to do as in will it cause slight errors or not?
by
edited by
That's good.. just to make sure #answer is an id not a class.. I had edited the answer......in fact there are many way to do..I just show you most easiest way.. but you should not modify core files... check Sama55 answer for that.. if you want to modify in php than that is more proper way.. however I haven't check that..
+1 vote
by
edited by

My case: Add below code to qa-theme/(your theme folder)/qa-theme.php.

function main_parts($content) {
  if(qa_request_part(0) == 'user') {
    /* for investigation
    echo '<PRE>';
    echo print_r($content, true);
    echo '</PRE>';
    */
    if(isset($content['form_activity']['fields']['answers']))
      unset($content['form_activity']['fields']['answers']);
  }
  qa_html_theme_base::main_parts($content);
}
Probably this logic will work in more than Q2A V1.4. There is method to make small layer plugin. However I doesn't mention it here.
...