You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 395 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
How to prevent the statistics module from gathering hits from certain hosts

15.2. How to prevent the statistics module from gathering hits from certain hosts

If you are still in the phase of editing and tweaking your PHP-Nuke site while it is already online, you may find out that your frequent visits are counted just as every other visit to your site by the statistics module. During a very productive phase, this can skew the statistics of your site quite a bit!

Contrary to what you might have expected, to prevent the statistics module from gathering hits from certain hosts, like your own one, you have to edit the header.php file, not any other file from the modules folder.

Note header.php and includes/my_header.php
 

Do not confuse header.php, a file located in the PHP-Nuke root directory, with the my_header.php file, located under the includes directory. The former contains standard PHP-Nuke functions for the PHP-Nuke header, the latter is there for your own, personal additions to the header.

In your header.php file, find the code:

include("includes/counter.php");

and replace it with[1]:

global $admin;
if(!is_array($admin)) {
$admin_name = base64_decode($admin);
$admin_name = explode(":", $admin_name);
$admin_name = "$admin_name[0]";
} else {
$admin_name = "$admin[0]";
}
if($admin_name != "PutYourAdminNameHere") {
include("includes/counter.php");
}

Put your administrator name in place of the "PutYourAdminNameHere" string in the above code and visits by that administrator will not increase your statistics counter any more.

Tip How to block all administrators from the statistics counter
 

A simpler fix, which will block all administrators from the statistics counter, is:

global $admin;
if(!$admin)
{
inlude("includes/counter.php");
}

Notes

[1]

See Block hosts from total hits in statistics module.

Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.090 Seconds - 162 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::