>>
Site Map
>>
Forums
>>
PHP-Nuke Common Problems & Solutions
Forum module - topics in forum:
PHP-Nuke Common Problems & Solutions - <font color=red>Look Here First For Your Problems And Get Their Solutions.</font><br><br>See also <a href="http://phpnuke-uk.net/modules.php?name=PHP-Nuke_HOWTO&page=common-installation-problems.html"><b>this</b></a> section of the phpnuke howto.<br>
Stopping Admin Accounts adding to page hit stats
: The Problem / Error
- The page hits counter counts the Admins of the site and you don’t want it to.
The Reason
- Well its quite simple really, it counts the Admins cause that’s what its supposed to do. This Solution (Hack) will allow you to stop it counting any hits from any or all Admins.
The Solution / Hack
PLEASE NOTE: Backup any files you need to edit before you edit them. You have been Warned
- Open the header.php file and look for the following line.
| Code: : |
| include("includes/counter.php"); |
- To stop the counter from counting just one Admin account use this code and replace “PutYourAdminNameHere” with the name of the Admin that you don’t want to count hits for.
The following code is from: http://www.nukeresources.com/modules.php?name=cfaq&qid=4&catid=2
| Code: : |
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");
} |
- If you want to not count ALL Admin accounts use this code
| Code: : |
global $admin;
if(!$admin) {
include("includes/counter.php");
} |
- Another possibility is to block a particular IP address, replace 111.111.111.1 with your ip in the following code:
| Code: : |
$the_ip = $_SERVER[REMOTE_ADDR];
if($the_ip != "111.111.111.1") {
include("includes/counter.php");
}
*code credit= Humpa & chris_au. |
Still Not Working
- If you find that you are still having problems and cant get this solution to work please post up your specific problem in the General Forum, stating that you have tried this Solution and we will try to help

Added Poll