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: Added detailed stats for hits and votes  (Read 11491 times)

0 Members and 1 Guest are viewing this topic.

Aditya Mooley

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 781
    • My Sweet Home
Added detailed stats for hits and votes
« on: October 06, 2004, 11:24:39 am »

Hello all,
have commited to CVS a new feature which allows the Admin to record the detailed stats of the hits and votes for each picture.
Currently I am recording IP, Referer, Browser, OS and in case of hits, if the referer is Google, Yahoo! or Lycos the term used for searching is also recorded.

Be sure to run update.php before testing.

Please report bugs to this thread.
« Last Edit: October 10, 2004, 01:58:32 pm by GauGau »
Logged
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Added detailed stats for hits and votes
« Reply #1 on: October 08, 2004, 09:46:48 am »

This is what I get when browsing to http://www.mysite.tld/coppermine/voteDetails.php :
Quote
While executing query "SELECT rating, count(rating) AS totalVotes FROM  WHERE pid=0 GROUP BY rating" on 0

mySQL error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE pid=0 GROUP BY rating' at line 1

Similar thing for http://www.mysite.tld/coppermine/hitDetails.php :
Quote
While executing query "SELECT * FROM  WHERE pid=0 ORDER BY sdate" on 0

mySQL error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE pid=0 ORDER BY sdate' at line 1
Nothing actually gets recorded in the table CPG_hit_stats, even if I browse the gallery as regular user or anonymous. I have run update.php, not sure what else I have done wrong.

Joachim
« Last Edit: October 10, 2004, 01:52:34 pm by GauGau »
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Added detailed stats for hits and votes
« Reply #2 on: October 08, 2004, 01:20:07 pm »

Joachim, it worked for me when I went to the gallery, clicked on an image, and displayed the image info - next to displayed is a link to the stats.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: Added detailed stats for hits and votes
« Reply #3 on: October 08, 2004, 02:08:23 pm »

@gaugau - looks like some of the files in the demo are old - I do not see link for details on the displayimage.php page.
@kegobeer - which URL did you see the details link on?
Logged
SANIsoft PHP applications for E Biz

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Added detailed stats for hits and votes
« Reply #4 on: October 09, 2004, 02:10:37 am »

From my test gallery on my local machine:

http://localhost/devel/displayimage.php?album=1&pos=0&pid=2, then make sure you are looking at the file information.

Looks like this:
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Aditya Mooley

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 781
    • My Sweet Home
Re: Added detailed stats for hits and votes
« Reply #5 on: October 09, 2004, 06:52:39 am »

From my test gallery on my local machine:

This more or less proves that demo has not got the complete files.
Logged
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Added detailed stats for hits and votes
« Reply #6 on: October 10, 2004, 01:50:35 pm »

shame on me, you were right. I didn't update all files properly. Flagging this as "invalid" (not your new feature, but my bug report ;)). Sorry.
I'll modify my posts in this thread  and remove the url of my demo site, as I don't want reference to it appear on the board once it gets opened to the testers.

Joachim
Logged

hooch

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: Added detailed stats for hits and votes
« Reply #7 on: August 23, 2005, 08:43:49 pm »

is it possible to see which user who have voted and what they voted?
/gustav
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Added detailed stats for hits and votes
« Reply #8 on: August 24, 2005, 11:12:54 am »

cpg1.4.1 goes unsupported. Don't try hijacking threads, especially not on the bugs board, and especially not a thread that isn't open any more >:(! The only thing such postings do is increase your negative karma ;).
Logged

Nibbler

  • Guest
Re: Added detailed stats for hits and votes
« Reply #9 on: November 30, 2005, 03:26:24 am »

Aditya, can you secure this feature? It is vulnerable to XSS and SQL injection attacks currently, you can't trust things like the user agent header to be safe.
Logged

Aditya Mooley

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 781
    • My Sweet Home
Re: Added detailed stats for hits and votes
« Reply #10 on: November 30, 2005, 06:16:12 am »

@Nibbler,
Thanks for bringing this issue to my notice. I will fix this issue as soon as possible.
Logged
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 18 queries.