Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Summary of Hit Statistics  (Read 40493 times)

0 Members and 1 Guest are viewing this topic.

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Summary of Hit Statistics
« on: November 01, 2006, 06:20:29 am »

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.
Logged

freynolds

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Summary of Hit Statistics
« Reply #1 on: November 02, 2006, 12:19:14 am »

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
Logged

christian

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 16
    • Aalborg Kunstpavillon (Art Gallery)
Re: Summary of Hit Statistics
« Reply #2 on: March 07, 2007, 11:02:33 pm »

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

RArch

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Summary of Hit Statistics
« Reply #3 on: August 12, 2008, 06:31:51 pm »

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?
Logged

freynolds

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Summary of Hit Statistics
« Reply #4 on: August 12, 2008, 08:22:56 pm »

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

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

Code: [Select]
($row[sdate] + Timeshift)
And replace timeshift with the hours you want to correct for your server...

Tell me if it works for you.

Francisco.
Logged

freynolds

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Summary of Hit Statistics
« Reply #5 on: August 12, 2008, 08:23:55 pm »

Seconds not hours...
3660 is an hour.
Logged

maxymalny

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 6
    • Family Album
Re: Summary of Hit Statistics
« Reply #6 on: August 13, 2008, 11:51:28 am »

Seconds not hours...
3660 is an hour.
3660??? Maybe 3600?
Logged

RArch

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Summary of Hit Statistics
« Reply #7 on: August 13, 2008, 02:07:49 pm »

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

Thanks for the info guys, it has helped.
Logged

RArch

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Summary of Hit Statistics
« Reply #8 on: August 13, 2008, 03:38:33 pm »

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:

Code: [Select]
$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.
Logged

paquets

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Summary of Hit Statistics
« Reply #9 on: July 03, 2009, 08:26:28 pm »

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

drownedgod

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 19
    • TV Screencaps
Re: Summary of Hit Statistics
« Reply #10 on: July 13, 2009, 09:34:18 am »

I installed it but I got this. Help?

Code: [Select]
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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Summary of Hit Statistics
« Reply #11 on: July 13, 2009, 11:17:52 am »

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.
Logged

drownedgod

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 19
    • TV Screencaps
Re: Summary of Hit Statistics
« Reply #12 on: July 13, 2009, 01:03:19 pm »

It worked. Thanks!
Logged
Pages: [1]   Go Up
 

Page created in 0.029 seconds with 20 queries.