Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
592 views
in Q2A Core by
How to count all views on questions without limitation of ip, user etc. ?

I want to count all views on questions regardless of ip, user etc. in 1.8.0.

I upgraded to 1.8.0 and it stopped counting all views

I did remove the code on question.php

Reference - http://question2answer.org/qa/51318/can-change-views-count-from-unique-based-simple-views-based

Removing code from question.php does not work anymore.

Can anyone help ?

Thanks for your help.
Q2A version: 1.8

1 Answer

–2 votes
by

if (qa_opt('do_count_q_views') && !$formrequested && !qa_is_http_post() && qa_is_human_probably() &&
    (!$question['views'] || (
        // if it has more than zero views, then it must be different IP & user & cookieid from the creator
        //(@inet_ntop($question['createip']) != qa_remote_ip_address() || !isset($question['createip'])) &&
        ($question['userid'] != $userid || !isset($question['userid'])) &&
        ($question['cookieid'] != $cookieid || !isset($question['cookieid']))
    ))
) {
    $qa_content['inc_views_postid'] = $questionid;
}

...