Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
554 views
in Q2A Core by
We are showing number of votes and answers in question list page and question page.
Is it possible to change the 0 votes to "Be firest to vote" and 0 answer to "be first to to answer"?

1 Answer

+2 votes
by
 
Best answer
You'd need to use an advanced HTML theme for this sort of thing. The code to put in your theme's qa-theme.php file would be something like this:

class qa_html_theme extends qa_html_theme_base
{

    function vote_count($post)
    {
        if ($post['netvotes_raw']==0)
            $this->output('MY SPECIAL THING FOR ZERO VOTES');
        else
            qa_html_theme_base::vote_count($post);
    }

   
    function a_count($post)
    {
        if (isset($post['answers']) && ($post['answers']['data']==0))
            $this->output('MY SPECIAL THING FOR ZERO ANSWERS');
        else
            qa_html_theme_base::a_count($post);
    }

}

More information about advanced themes here:

http://www.question2answer.org/advanced.php#theme-advanced
by
Fantastic, your software is very flexible!

Thank you for quick response, GidGreen! :)
by
Very good option, i implemented in my site!
Thanks!
by
The great thing about Q2A is it is as flexible as PHP itself :P
...