Stats Stats
 

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

Stats

Started by freynolds, October 04, 2006, 01:17:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

freynolds

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

Joachim Müller

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

freynolds

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?

Sami

#3
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
‍I don't answer to PM with support question
Please post your issue to related board

freynolds

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?

Joachim Müller

It is possible if you code it.

freynolds

#6
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?

Joachim Müller

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

digimic

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

freynolds

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.

Joachim Müller

Quote from: digimic 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
If you would have read the thread that you're replying to you would have figured out that there is no mod yet. ::)

Quote from: freynolds on October 06, 2006, 02:18:10 AM
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.

Quote from: freynolds on October 06, 2006, 02:18:10 AM
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

freynolds

#11
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.

freynolds

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


freynolds

#14
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:
Quote from: freynolds 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.
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...

freynolds

#15
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.

bobby131313

QuoteIm 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


freynolds

thx for the nonsense comment..

bobby131313

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


Joachim Müller

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