PDA

View Full Version : Pixelpost Photo Rating (version 1.3) bug ?


digitalfrog
10-30-2006, 11:40 AM
This is a great plugin, and it really helps me figure out what pictures are more successfull than others. (now. if only people could comment when they slam a picture ;-)

Anyhow, it maybe a small detail but I think deleting pictures that received a rating do not get reset in photorating.

I currently have:

"Number of rated photos 29 out of the 25 posted photos are rated"

Has anyone else spotted this ? I'm not sure it really matters, but again it may ;-)

Any feedback welcome !

Ralph, aka Digitalfrog

Rob
10-30-2006, 05:24 PM
Sorry, I never really thought that people would delete pictures from their photoblogs. I also haven't been doing much development on this addon because I don't use it anymore. I found that when people rate photos they tend to not comment, so I use the number of comments now to determine how popular photos are.

If you want to clean up the data, you can always go into the database with something like phpMyAdmin and clean out data for deleted photos. Modifying the rating script to use an inner join for the stats query would sort it out too.

Dennis
10-30-2006, 06:29 PM
I'm also interested in a fix for this "bug".

Dennis
11-01-2006, 07:46 PM
Hmmm... I think this should fix it:

On line 144 change:

$query = "INSERT INTO temp_ratings SELECT parent_id, ROUND(AVG(rating),2), COUNT(rating) FROM `{$pixelpost_db_prefix}ratings` GROUP BY parent_id";


to


$query = "INSERT INTO temp_ratings SELECT parent_id, ROUND(AVG(rating),2), COUNT(rating) FROM `{$pixelpost_db_prefix}ratings` INNER JOIN {$pixelpost_db_prefix}pixelpost ON parent_id=id GROUP BY parent_id";