Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+5 votes
1.0k views
in Q2A Core by
edited by

How can i remove "+" sign on votes ? <span class="qa-netvote-count-data">+1</span> ? Just leave "-" when negative vote appears.

2 Answers

+3 votes
by
selected by
 
Best answer

Here's what I do in my theme:

    function vote_count($post)
    {
        $post['netvotes_view']['data'] = str_replace( '+', '', $post['netvotes_view']['data'] );
        parent::vote_count($post);
    }

Add that to the qa-theme.php file for the theme you are using.

 

by
Thanks for the code.
by
Great fix, thanks.
+3 votes
by

Add below code to your theme file.

Get code on Gist

public function output_split($parts, $class, $outertag='span', $innertag='span', $extraclass=null)
{
    $parts['data'] = str_replace('+', '', $parts['data']);
    parent::output_split($parts, $class, $outertag='span', $innertag='span', $extraclass=null);
}
by
That's not a good way to do this because it removes all + signs in all posts.
by
Thanks for updating me...

Just to clarify my query..all post you mean from all question, answer etc.. positive votes or somewhere else too?

Because as I understood WhyChese question he wants too remove + sign from everywhere.
...