| Author |
Message |
biohazzardcreations
Nuke Cadet


Joined: Jul 27, 2004
Posts: 6
|
Posted:
Wed Jul 28, 2004 2:38 am |
  |
Well as I am making this post I have noticed that whenever someone relods my page it add another hit to the counter. Is there anyway to make it so that the counter does not count page reloads and so that it only counts visits to the site like lets say that user logs in and click like 70 pages well I want the counter to only count as 1 (one). also I found before a way to make it so that the admin of the site is not counted towards page clicks but it only worked for the index page and after that every click and reload was counted.
If there is a way around this then please let me know,. Thank you |
|
|
   |
 |
BrainSmashR
Support Mod


Joined: Jan 05, 2004
Posts: 1390
Location: Louisiana, USA
|
Posted:
Wed Jul 28, 2004 3:00 am |
  |
this is currently no such feature. You "could" add a free counter from sitemeter.com which counts unique IP address visiting your site.
Check it out in the footer of my homepage |
_________________

USE THE FORUM. If you contact me via messenger for support I will add you to my ignore list. |
|
       |
 |
biohazzardcreations
Nuke Cadet


Joined: Jul 27, 2004
Posts: 6
|
Posted:
Wed Jul 28, 2004 4:33 am |
  |
Thank you for that info. I think that someone should find a way to do that in nuke. |
|
|
   |
 |
BrainSmashR
Support Mod


Joined: Jan 05, 2004
Posts: 1390
Location: Louisiana, USA
|
Posted:
Wed Jul 28, 2004 12:58 pm |
  |
| Quote: |
| I think that someone should find a way to do that in nuke. |
Well, it'snot very accurate. I imagine that's why it's been left out.
Any 56K user has a dynamic IP address. If they disconnect, then reconnect and check your site 3 times a day, that would be incorrectly listed as 3 different visitors because the IP address would be different.
The page counter specifically counts how many times a page has been loaded from your site, regardless of the number of users or unique IP addresses. |
_________________

USE THE FORUM. If you contact me via messenger for support I will add you to my ignore list. |
|
       |
 |
Willy_Wonka
Corporal


Joined: Jun 22, 2003
Posts: 69
Location: The Chocolate Factory
|
Posted:
Wed Jul 28, 2004 8:12 pm |
  |
biohazzardcreation wrote:
the admin of the site is not counted towards page
That is easy fixed.
Just find in header.php
| Code: |
include("includes/counter.php");
|
and change to:
| Code: |
if(!$admin){include("includes/counter.php");}
|
In regards to if the user is logged in and count only one page per visit, I am sure that it would not take a genius to work that one out. |
|
|
   |
 |
biohazzardcreations
Nuke Cadet


Joined: Jul 27, 2004
Posts: 6
|
Posted:
Thu Jul 29, 2004 8:25 am |
  |
Thank you Willy Wonka for that it works excelently. but will it make it so that all of the pages do not count or just the index |
|
|
   |
 |
Willy_Wonka
Corporal


Joined: Jun 22, 2003
Posts: 69
Location: The Chocolate Factory
|
Posted:
Thu Jul 29, 2004 3:05 pm |
  |
| biohazzardcreations wrote: |
| Thank you Willy Wonka for that it works excelently. but will it make it so that all of the pages do not count or just the index |
After logging in, nothing gets counted. |
|
|
   |
 |
biohazzardcreations
Nuke Cadet


Joined: Jul 27, 2004
Posts: 6
|
Posted:
Thu Jul 29, 2004 9:33 pm |
  |
Well I added that cone into the proper place and still everything gets counted. Do i need to log out and then back in for it to take effect? |
|
|
   |
 |
flicman
Nuke Soldier


Joined: Jul 26, 2004
Posts: 17
|
Posted:
Thu Jul 29, 2004 10:14 pm |
  |
Strangely enough, this doesn't work for me, either. I'd love to have the option here, though. I'd like a slightly truer view of how many hits I'm getting each day, without my incessant reloads to check problem areas as i hack the thing to pieces. |
|
|
    |
 |
AJJ
Nuke Soldier


Joined: Jul 24, 2004
Posts: 14
|
Posted:
Sun Aug 08, 2004 2:23 am |
  |
I am using 7.2, and it doesn't work me either.
I would also like to have the solution.
AJJ |
|
|
   |
 |
nobleclem
Lieutenant


Joined: May 27, 2003
Posts: 167
Location: Southfield, MI
|
Posted:
Sun Aug 08, 2004 4:15 am |
  |
try this and let me know if it works or not
| Code: |
global $admin;
if(!is_admin($admin)){include("includes/counter.php");} |
Remember this will make it so that if you are logged in as an admin that the pages will not be counted. So to test it to see if its counting then log out of the administration and browse your site and see it the counter goes up.... |
_________________ ....Check Out These Great Sites....
http://HackerAssassins.com is home to PHP-Nuke 7.4 HA Enhanced | http://FatalException.us
http://Vaelio.com < -- > The Future of CMS Technology and Design Today -- coming soon |
|
       |
 |
AJJ
Nuke Soldier


Joined: Jul 24, 2004
Posts: 14
|
Posted:
Sun Aug 08, 2004 11:19 am |
  |
Now its working
Thanx buddy |
|
|
   |
 |
nobleclem
Lieutenant


Joined: May 27, 2003
Posts: 167
Location: Southfield, MI
|
Posted:
Sun Aug 08, 2004 1:29 pm |
  |
Glad I could help.
What was wrong with the origional code is that the variable $admin even though you are logged out can still have data in it there fore will always stop the counter for those who have logged into the admin panel. So using the is_admin($admin) for a check is better where it will return a 0 if you are not logged in. |
_________________ ....Check Out These Great Sites....
http://HackerAssassins.com is home to PHP-Nuke 7.4 HA Enhanced | http://FatalException.us
http://Vaelio.com < -- > The Future of CMS Technology and Design Today -- coming soon |
|
       |
 |
|
|