Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
490 views
in Q2A Core by
Say a question gets 15,456 visits, instead of reporting that number at the question list ( not question page) is there a plugin or setting to round the number of visits  from 15,456 to 15k?
Q2A version: 1.6.3

2 Answers

+2 votes
by
selected by
 
Best answer

Here is my solution although I don treally like core hack:

in your qa-theme.php,

search for "    function q_item_stats($q_item) // add view count to question list"

then add the foloowing lines:

           
            if ($q_item['raw']['views']>10000){
                //AA $q_item['views_raw'] and $q_item['raw']['views'] will

              //also have the same value                       

               //but somehow $q_item['views']['data'] gets displayed
                $q_item['views']['data'] = round($q_item['raw']['views']/1000).'k';
            }

+1 vote
by

I don't know of any plugin, but it would be quite easy to do this yourself in a custom theme. Wherever the number of views is output you can change the format Something along the lines of

if ($views > 10000) {
  $views = round($views/10000).'k';
}

Change $views for whatever variable has the views.

by
Thanks for the tip Scott, I just didnt want to touch the core code
...