Description: This modification will collect and display in a box (like a pals box) the hits per month on your site. It can be altered to show the OS used, language etc.
Working Under: UBB.Threads 6.0-6.1-6.2-6.3
Mod Status: Finished
Any pre-requisites: none
Author(s): dimopoulos
Date: 06/06/03
Credits: Nikos Dimopoulos
Files Altered: The file that you want to collect the data, usually index.php
New Files: statistics.php
Database Altered: Yes, new table visits created
Info/Instructions: CAUTION!!! This script will most probably increase the load on your database significantly, especially if you have a busy site. If you place the script that collects data in your front page then every visitor will require one hit in the database, so be careful before implementing it.
Instructions are included in the attached file.
Disclaimer: Please backup every file that you intend to modify. If the modification modifies the database, it's a good idea to backup your database before doing so.
Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.
Josh (other) and Zackary. Yes it will count hits even if they come from people that sit all day long and refresh the page.
I was thinking of incorporating some sort of a cookie to the user's machine which will tell the script that this user has visited the site and no longer do we need to keep these statistics. But how can you justify what is a valid time to live for a browsing? To me if a user hits refresh on a page just to increase the counter is not a valid hit, but the person who is there and reads some posts, does something else later and then refreshes the page again is a valid hit.
We can definitely enhance the script to become a proper pal box and to have it integrated with IIP providing information like the hits per day/month/year, referrer checks etc.
Once again this is not meant to replace retro stats or any other statistics package (especially your raw webserver files). And make sure that if you run this script on your site to monitor the MySQL performance over the period that you run the script. From personal experience, if you have a small site like mine circa 150 hits a day on average then you are fine. For more hits a day, please run your own metrics and let us all know about it.
Sorry about that everybody. I have ammended the instructions and also added an image file (bluebar.jpg) which needs to be in the images folder or wherever you need it to be (your choice in the script)
I'll consider this. I run the server here in my home and I don't get a HUGE amount of hits, but I hate to get "inflated" stats because I check the site between 5-10 times a day and I know other users do as well.
I have no other software or services to track stats on my site and this would be handy.
Thanks again for the great mod, I've added it to my "to add" list for when I upgrade to 6.3.
I can see what you did. Since I had that modification as a "pals" box on my site, I was sending the header and footer a lot earlier than this so I didn't need it. With your implementation you can have it even as a standalone page.
I don't think that checking the site five or ten times a day makes inflated stats but I see what you mean. I had the same problem with a stupid person who managed to go and refresh so many times just to bring the counter up to 500,000. Fortunately I got there in time and killed his connection.
There is of course room for improvement on this script and if we all decide what is the acceptable time to live for a connection to become new then I can modify it to write to a cookie hence not double count hits.
Nikos yes I found out f from inadvertantly realizing from your directions you did not say pal box etc. So I tried running it standalone and realized wait it does not know what a tablewrapper variable is. HMM Okay let me add this and that. It's all good.
Nikos yes I found out f from inadvertantly realizing from your directions you did not say pal box etc. I did notice on this thread though it says can run in a box ( like a pal box ) So I tried running it standalone and realized wait it does not know what a tablewrapper variable is. HMM Okay let me add this and that. It's all good.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.