coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: matu111 on April 03, 2005, 12:48:14 PM

Title: Toprated pictures ! Please help me!
Post by: matu111 on April 03, 2005, 12:48:14 PM
Hy! I have read some topics here, but haven´t found a solution for me.
My situation is: I have got 1 category and there´s four albums in it. Users can choose only which albums of those 4, to upload pictures.
The most visited category works well, if you choose a picture there, the same picture appears. But the problem is with top rated pictures. There is a top shown, but if you choose any of those top-rated pictures, theres a mess, it shows a random picture or sth. Not the right one.
Altough, if you are already in of some of those albums, the top-rated system works well.  ::)


Is there a solution for this problem, can we fix it? Is anybody already done it ?
Title: Re: Toprated pictures ! Please help me!
Post by: tomrock on April 03, 2005, 03:29:31 PM
I had the same problem with Top Rated Pictures. Somewhere on this board (I forget where) I found this.

In the includes directory is a file functions.inc.php. In this file you need to find

ORDER BY ROUND((pic_rating+1)/2000) DESC, votes DESC $limit"

and change it to

ORDER BY ROUND((pic_rating+1)/2000) DESC, votes DESC, pid DESC $limit"

That seems to have worked for me but I hope I didn't screw something else up!!

Good luck.

Tom
Title: Re: Toprated pictures ! Please help me!
Post by: matu111 on April 03, 2005, 05:43:25 PM
already found a solution. My mistake was that i haven´t actually created a category. I thought i did, but i didn´t. And the 4 albums were just there, not placed in a category.

;D
Title: Re: Toprated pictures ! Please help me!
Post by: lilleman on April 19, 2005, 11:00:21 AM
Quote from: tomrock on April 03, 2005, 03:29:31 PM
I had the same problem with Top Rated Pictures. Somewhere on this board (I forget where) I found this.

In the includes directory is a file functions.inc.php. In this file you need to find

ORDER BY ROUND((pic_rating+1)/2000) DESC, votes DESC $limit"

and change it to

ORDER BY ROUND((pic_rating+1)/2000) DESC, votes DESC, pid DESC $limit"

That seems to have worked for me but I hope I didn't screw something else up!!

Good luck.

Tom
thanks tomrock... had the same problem and this did it for me
Title: Re: Toprated pictures ! Please help me!
Post by: Mousehill on April 25, 2005, 09:47:06 AM
Thanks for this post, I had the same problem, this solution fixed it!

Mousehill