Added detailed stats for hits and votes Added detailed stats for hits and votes
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Added detailed stats for hits and votes

Started by Aditya Mooley, October 06, 2004, 11:24:39 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Aditya Mooley

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.
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter

Joachim Müller

#1
This is what I get when browsing to http://www.mysite.tld/coppermine/voteDetails.php :
QuoteWhile 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 :
QuoteWhile 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

kegobeer

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

@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?
SANIsoft PHP applications for E Biz

kegobeer

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:
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

Quote from: kegobeer on October 09, 2004, 02:10:37 AM
From my test gallery on my local machine:

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

Joachim Müller

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

hooch

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

Joachim Müller

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

Nibbler

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.

Aditya Mooley

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