I've wrote patch to exclude root user from statistics with option on settings page. Please, check strings twice, because my English is bad.

CommentFileSizeAuthor
#1 patch2.diff6.33 KBdmitriy.trt
exclude_root_user.diff1.37 KBdmitriy.trt

Comments

dmitriy.trt’s picture

Title: Exclude user #1 » Exclude user #1, more statistics to block
StatusFileSize
new6.33 KB

Here is new patch with more modifications: added statistics about pages and hosts to block:

  • within last day
  • within last week
  • within last month (30 days)

Everything can be disabled.
Also deleted description from some settings, and deleted call to drupal_bootstrap in visitors_exit().

New patch includes previous.

Sorry for bad English, again. Please, check strings.

gashev’s picture

exclude_root_user.diff:

if ($user->uid == '1' && variable_get('visitors_exclude_root_user', 1)

Root user always with uid = 1? I don't know.

patch2.diff:

I don't want to add more functionality to visitors_exit function. Visitors_exit function - very fast, only log current user info. No more.

gashev’s picture

Version: 6.x-0.11 » 6.x-0.8

visitors_exclude_administer_user feature added to next release.

Different from visitors_exclude_root_user: checking user_access('administer').

gashev’s picture

Version: 6.x-0.8 » 6.x-0.11
Assigned: Unassigned » gashev
gashev’s picture

Version: 6.x-0.8 » 6.x-0.11

Visitors 6.x-0.12, 2009-04-25
------------------------
- Changed:
* feature request #439254: Exclude administer users from statistics.

dmitriy.trt’s picture

Root user always has uid==1. See http://api.drupal.org/api/function/user_access/6

gashev’s picture

Check plz visitors_exclude_administer_user (6.x-0.13) (is the same of visitors_exclude_root_user).

dmitriy.trt’s picture

patch2 doesn't add more code to visitors_exit. All additional code is for block which displays statistics and for settings page.

Sorry for reply after 3 months, but I still need features added by patch2. Of course, I'm using modified version of your module, but it would be great to see this features in upstream.

gashev’s picture

Status: Needs review » Closed (fixed)

  • Commit 349a6f4 on 7.x-1.x, master, 8.x-1.x, 7.x-1.x-browscap, 7.x-2.x, 7.x-2.x-browscap-separate-table by gashev:
    feature request #439254: Exclude administer users from statistics.
    
    

  • Commit 349a6f4 on 7.x-1.x, master, 8.x-1.x, 7.x-1.x-browscap, 7.x-2.x, 7.x-2.x-browscap-separate-table, 8.x-2.x by gashev:
    feature request #439254: Exclude administer users from statistics.