Suggestion: page views by admins do not increment counter

Everything related to Hesk - helpdesk software

Moderator: mkoch227

Post Reply
srumberg
Posts: 41
Joined: Thu Feb 07, 2013 11:33 am

Suggestion: page views by admins do not increment counter

Post 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.
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

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

Post 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'])
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
srumberg
Posts: 41
Joined: Thu Feb 07, 2013 11:33 am

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

Post 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']))
deserteagle369
Posts: 94
Joined: Wed Feb 29, 2012 2:00 am

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

Post 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.
Eagle
Life is a journey.
Post Reply