Page 1 of 1

Suggestion: page views by admins do not increment counter

Posted: Thu Apr 11, 2013 11:42 pm
by srumberg
Suggestion: When admin users view or edit knowledgebase articles, do not increment the "# of Views" counter. Certainly, when an article is viewed from the "Manage Knowledgebase" area, the counter should not be incremented.

Why: Including internal users in the view count does not accurately represent the views (popularity) of a particular page.

Re: Suggestion: page views by admins do not increment counte

Posted: Fri Apr 12, 2013 2:52 pm
by Klemen
You can edit the knowledgebase file by modifying the *second*

Code: Select all

hesk_detect_bots()
to

Code: Select all

hesk_detect_bots() && ! isset($_SESSION['id'])

Re: Suggestion: page views by admins do not increment counte

Posted: Fri Apr 12, 2013 4:12 pm
by srumberg
Thank you for the guidance. For the benefit of others, I modified as follows:

knowledgebase.php, line 279 to be:

Code: Select all

    if ( ! isset($_GET['rated']) && ! hesk_detect_bots() && ! isset($_SESSION['id']))

Re: Suggestion: page views by admins do not increment counte

Posted: Mon May 06, 2013 1:45 am
by deserteagle369
I did the change as you guys suggest but it still count for admin, in both of below situation:

1. admin login, then knowledge base -> view knowledge base,
BTW, when admin view the article, the url is http://myhesk/hesk/admin/knowledgebase_ ... 482&back=1, not knowledgebase.php

2. admin login, then open a new page to visit kb like user, when click article, still count.