forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: Aditya Mooley on October 06, 2004, 11:24:39 am

Title: Added detailed stats for hits and votes
Post by: Aditya Mooley 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.
Title: Re: Added detailed stats for hits and votes
Post by: Joachim Müller 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
Title: Re: Added detailed stats for hits and votes
Post by: kegobeer 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.
Title: Re: Added detailed stats for hits and votes
Post by: Tarique Sani 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?
Title: Re: Added detailed stats for hits and votes
Post by: kegobeer 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:
Title: Re: Added detailed stats for hits and votes
Post by: Aditya Mooley 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.
Title: Re: Added detailed stats for hits and votes
Post by: Joachim Müller 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
Title: Re: Added detailed stats for hits and votes
Post by: hooch on August 23, 2005, 08:43:49 pm
is it possible to see which user who have voted and what they voted?
/gustav
Title: Re: Added detailed stats for hits and votes
Post by: Joachim Müller 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 ;).
Title: Re: Added detailed stats for hits and votes
Post by: Nibbler 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.
Title: Re: Added detailed stats for hits and votes
Post by: Aditya Mooley 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.