Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Is it possible for an admin to be the only one who watches a number of question views

+1 vote
57 views
asked Mar 13 in Q2A Core by islam afify

1 Answer

+1 vote
answered Mar 13 by pupi1985
selected Mar 14 by islam afify
 
Best answer

It is unclear what theme you're using but assuming SnowFlat you have to:

1. Edit qa-theme/SnowFlat/qa-theme.php

2. Wrap this line:

https://github.com/q2a/question2answer/blob/d7238e5d754b8718878db017c6ada6eddcb6897a/qa-theme/SnowFlat/qa-theme.php#L425

So that it looks like this:

if (qa_get_logged_in_level() >= QA_USER_LEVEL_ADMIN) {
  parent::view_count($q_item);
}

3. Wrap also this line in the same way:

https://github.com/q2a/question2answer/blob/d7238e5d754b8718878db017c6ada6eddcb6897a/qa-theme/SnowFlat/qa-theme.php#L453

if (qa_get_logged_in_level() >= QA_USER_LEVEL_ADMIN) {
  parent::view_count($q_view);
}

...