Summary of Hit Statistics Summary of Hit Statistics
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Summary of Hit Statistics

Started by Paver, November 01, 2006, 06:20:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Paver

This plugin is originally based on the discussion in this thread.  It provides a summary of the hit statistics kept by Coppermine (if you have set "Keep detailed hit statistics" on the config panel).  Coppermine gives you the details for each file/photo with a popup window linked on each file/photo (in the info box).  This plugin gives you a summary of the hit statistics overall.  I imagine that this plugin will add features as people contribute them, so feel free to submit code contributions on this thread for inclusion into future versions of this plugin.

Version 0.1 beta - initial release of the plugin by wrapping the code in the original support thread into the plugin system.  This version has not been tested thoroughly so please report any issues here.  This version gives you a summary of the hit statistics from the last N number of days sorted by IP address with number of hits.  The hits from each IP address can then be broken down and displayed in a table.

freynolds

I've just tried out the plugin and it works great!

Paver thanks alot for this!

I will test it out and talk to you if there is anything not workin as it should.

Thanks again

christian

Great plugin! And if you could do an automatic lookup in the members list ...  ::)
Christian

RArch

This plugin is working good on my server too.

Would it be possible to add some functionality so that it can convert server times to local times?

freynolds

Rarch, I was impressed to hear a comment on the subject over two years ago, at the momment I'm not using a cooppermine gallery, facebook sort of replaced the need for it.
So I can't help you, but if you check the code you might be able to change the way is printed. just add the amount of hours you want it to change to the number before you print it and you might get what you want.

In line 52 of ip_watch.php

    echo "\n\n<TR><TD align=\"middle\">".date("D d-m h:i:s a",$row[sdate])."</TD>";

change
$row[sdate]

to

($row[sdate] + Timeshift)

And replace timeshift with the hours you want to correct for your server...

Tell me if it works for you.

Francisco.

freynolds

Seconds not hours...
3660 is an hour.

maxymalny


RArch

Yeah, its an old mod but its a great one for viewing those stats  ;)

Thanks for the info guys, it has helped.

RArch

I've modified the files from the original plugin to add a time zone option, where you can add/subtract hours from the server time to correct the displayed time should your web server be in a different time zone.

The files ip_watch.php and stats.php have changed, you just need to install the plugin (posted above) as normal and overwrite those two files with the ones in the attached zip.

Near the top of each file (line 13) there is the following new variable:

$timeshift = 3600 * 8; /** Adjust server time by adding 8 hours **/

You need to set this to the number of seconds (ie. 3600 * hours) that you want to add to the server time or a negative value if you need to remove time.

I've also added a link to lookup the ip address (line 26, using dnsstuff.com), you may edit this to add your favourite lookup site. I like an idea of my visitor come from.

PS. Within the Config options of Coppermine under "General Settings" you set the "Timezone difference relative to GMT" I wonder if there is way of using this to set the timeshift variable. Maybe someone would like that challenge and modify this again.

Thanks freynolds and Paver for sharing this plugin.

paquets

Great plugin Paver. Would it be possible to also have the username with the IP address?

drownedgod

I installed it but I got this. Help?

Fatal error: online_configure() [function.require]: Failed opening required './plugins/onlinestats/include/init.inc.php' (include_path='.:/usr/local/lib/php:/usr/local/lib/php/PEAR:/usr/local/share/pear') in /plugins/onlinestats/codebase.php on line 46

Joachim Müller

Means you haven't uploaded all files that belong to the plugin. Uninstall the plugin, delete the folder that contains the plugin files, get a fresh copy of the plugin archive, unzip preserbing the folder structure, upload the entire plugin's folder with all sub-folders that resided in the zip archive, install the plugin using the plugin manager. If that doesn't help, stay out of this announcement thread, but start an individual support request.

drownedgod