Advanced search  

News:

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

Pages: [1] 2   Go Down

Author Topic: Stats  (Read 14481 times)

0 Members and 1 Guest are viewing this topic.

freynolds

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Stats
« on: October 04, 2006, 01:17:47 am »

Im looking for a mod or plugin or whatever that could make me a stat list of what did the last ip/user did in the gallery.
Something like the stats that yabb has incorported in the admin section.

thx
« Last Edit: November 02, 2006, 12:33:16 am by Paver »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Stats
« Reply #1 on: October 04, 2006, 09:32:39 am »

Coppermine doesn't record user actions in such a detailed manner, so all coppermine pages would have to be modified to add some code that records what the user currently does (additional queries). Then you'll have to come up with the code to display those stats. Not a trivial thing. You'll have to code this if you need it (or hire someone to code it for you).
Logged

freynolds

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Stats
« Reply #2 on: October 05, 2006, 12:13:16 am »

what im looking for is the following. I have in the sql database a table "cpg149_hit_stats" this table captures data from each hit and afterwards you can see this bellow each picture.

it has this structure:
  sid  pid  ip  search_phrase  sdate  referer  browser  os 
and an example of the contents.
  1 5 190.50.142.###  1159314848 %2Fcoppermine%2Findex.php... Unknown Windows XP

There isn't any plugin or what so ever that can show in a stilish way this to the admin?

Or if there isn't, have you got any idea how could I write a script to make this work?
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Stats
« Reply #3 on: October 05, 2006, 12:25:57 am »

It doesn't need plugin , you can see that info for each file on dispalyimage.php under file info block display: there is a detail link
« Last Edit: October 05, 2006, 07:28:25 am by Sami »
Logged
‍I don't answer to PM with support question
Please post your issue to related board

freynolds

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Stats
« Reply #4 on: October 05, 2006, 01:16:48 am »

It seams like I have explained incorrectly what im looking for.

Im looking for something as a list of the last 100 pageloads.
Or what the last 10 visitors did.
Or something like this, not just who saw a picture.

Is this possible?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Stats
« Reply #5 on: October 05, 2006, 06:04:59 am »

It is possible if you code it.
Logged

freynolds

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Stats
« Reply #6 on: October 05, 2006, 09:04:14 pm »

Ok, then I will try... I know how to program in c++ but I have no idea how to code php/mysql, any advice?

Nevermind, I just make a google search, and its practicaly the same as c ansi.

Thanks... When developing a plugin or whatever u call it, in what forum I have to talk?
« Last Edit: October 05, 2006, 09:27:29 pm by freynolds »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Stats
« Reply #7 on: October 05, 2006, 11:04:41 pm »

Post your mod / hack / plugin on the support board - a moderator will move it if applicable.
Logged

digimic

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 41
Re: Stats
« Reply #8 on: October 06, 2006, 01:37:15 am »

is there a mod for this?
in order to see which photo each user saw ? to trace the user connections
Logged

freynolds

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Stats
« Reply #9 on: October 06, 2006, 02:18:10 am »

Ok, i started with the php thing, and its not dificult, I've managed to make a php that opens mysql and extracts the hit data and puts it into an array. What im missing is how is the hit time stored, the numbers are like the following: 1159314848 or 1159357142... I don't know if they are the amount of seconds transcured or what so ever.

Got any idea?

What I'm trying to do at the time is a plugin or something (because I have no idea how the plugin has to work).
This so I can see what ip did what in the last n days.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Stats
« Reply #10 on: October 06, 2006, 08:13:56 am »

is there a mod for this?
in order to see which photo each user saw ? to trace the user connections
If you would have read the thread that you're replying to you would have figured out that there is no mod yet. ::)

I've managed to make a php that opens mysql and extracts the hit data and puts it into an array.
You should use the Coppermine functions to run the queries - the mysql connection should already be established when your mod is running from within Coppermine.

What im missing is how is the hit time stored, the numbers are like the following: 1159314848 or 1159357142... I don't know if they are the amount of seconds transcured or what so ever.
Times are being stored using timestamps in the Unix time format, see http://www.php.net/manual/en/function.time.php
Logged

freynolds

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Stats
« Reply #11 on: October 06, 2006, 06:24:24 pm »

Ok, to use the mysql functions in coppermine I use this function cpg_db_query()? And afterwards I use normal mysql functions like mysql_fetch_array()?

And how do I make a mod that runs inside coppermine... I have no clue and I can't find anything relevant in the forum...

I also want to add a link in the admin user like random_select does where I can put the statistics.
« Last Edit: October 06, 2006, 07:29:17 pm by freynolds »
Logged

freynolds

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Stats
« Reply #12 on: October 07, 2006, 03:39:43 am »

Also in the table hit_stats the referer part has all the urls like the following:

%2Fcoppermine%2Fdisplayimage.php%3Falbum%3D9%26pos%3D11

insted of

/coppermine/displayimage.php?album=9&pos=11

This is a problem with my system, or this happens in every CPM?

thx
Logged

Nibbler

  • Guest
Re: Stats
« Reply #13 on: October 07, 2006, 01:19:17 pm »

Logged

freynolds

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Stats
« Reply #14 on: October 07, 2006, 02:20:44 pm »

about urldecode() shouldnt stats_details have a urldecode? since it print the chunk as it was a text string and the url afterwards it looks like the following:

http://mysite/copermine/http%3A%2F%mysite%2Fcoppermine%2Fdisplayimage.php%3Falbum%3Dlastcom%26cat%3D0%26pos%3D1

and let me say if i press on the link it does not work  :o

ok.

in regards to this:
Ok, to use the mysql functions in coppermine I use this function cpg_db_query()? And afterwards I use normal mysql functions like mysql_fetch_array()?

And how do I make a mod that runs inside coppermine... I have no clue and I can't find anything relevant in the forum...

I also want to add a link in the admin user like random_select does where I can put the statistics.
anyone has any data I could use?

I have achieved a php that prints the ip visitor list for the past n days (you can modify the amout of data to take in acount).
And if you click on the ip it will print the referer pages for that period.

Now what is left for me is transport it into CMG...
« Last Edit: October 09, 2006, 08:48:05 pm by freynolds »
Logged

freynolds

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Stats
« Reply #15 on: October 09, 2006, 08:48:34 pm »

any answers?

ok, this is what i've done so far (if anyone care to use a plugin like this):

a php script that lets you see the ips that entered the gallery, with a count of hits that each ip did.

with an output like this: (the amount of days of the tracking can be changed)

Showing form:08-10-06 02:18:24 pm To: 09-10-06 02:18:25 pm
190.50.165.xxx(3)
201.235.145.xxx(2)
190.50.172.xxx(52)
...

each ip has a link to another php script that has an output like the following:

Showing form:08-10-06 02:22:46 pm To: 09-10-06 02:22:46 pm
Date - Time                  Album # Photo# Filepath                         Referer URL
Mon 09-10 01:52:58 pm  2           15       pinamar/14.jpg                 Referer
Mon 09-10 01:52:47 pm  1           5         chacra/2.jpg                   Referer
Mon 09-10 01:51:30 pm  13          963     viaje_eg/DSC05462.JPG     Referer

Where the album # has a link to the album thumbs page, the photo # has a link to that photo, and the referer url has a link to that.
 
Also Im going to add a posibility to view the thumbs of each picture to make the traking easier.

And maybe a last 100 pageloads or something like that.

I'm trying to make a plugin with all this things, so any help on plugin coading and stuff will be apreciated.
« Last Edit: October 09, 2006, 09:28:41 pm by freynolds »
Logged

bobby131313

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
    • Coin Community Family
Re: Stats
« Reply #16 on: October 10, 2006, 07:43:41 am »

Quote
Im looking for something as a list of the last 100 pageloads.
Or what the last 10 visitors did.
Or something like this, not just who saw a picture.

Is this possible?

Why not just sign up at statcounter.com , they give you extremely detailed stats for your last 100 pageloads for free. (referrers, ips, visitor through site tracking, entry and exit pages, search terms, and oh so much more) Just plop the code in your html template and you're done.  ;D

Logged

freynolds

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Stats
« Reply #17 on: October 11, 2006, 02:41:15 pm »

thx for the nonsense comment..
Logged

bobby131313

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
    • Coin Community Family
Re: Stats
« Reply #18 on: October 13, 2006, 10:07:35 pm »

Quote
thx for the nonsense comment..

Hmmmm.... I hope you're not talking to me. It would give you exactly everything you've asked for and you would have been done 10 minutes after reading my post.

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Stats
« Reply #19 on: October 14, 2006, 10:50:37 am »

@bobby131313: freynolds doesn't seem to be interessted in a third party counter script, probably because third party tools can't accomplish the same thing an on-site counter can do. I understand that you're trying to be helpful, but it's his thread, so please respect his wish not to discuss a third-party counter script here.
Logged
Pages: [1] 2   Go Up
 

Page created in 0.022 seconds with 21 queries.