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: Wrong order of photos in Top Rated?  (Read 3486 times)

0 Members and 1 Guest are viewing this topic.

peakoverload

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 51
Wrong order of photos in Top Rated?
« on: January 16, 2005, 11:30:04 pm »

I'll be the first to say that the voting system in Coppermine has always confused the hell out of me and I am having a bit of a problem with it at the moment.

I run Coppermine in a frame within my Mambo driven site (www.peakoverload.com). On Coppermine's Index page I have it set uip to show 32 positions of Top Rated photos but recently a number of members have been noticing some weird movement of their photos on this page. In that photos that featured highly up the page now appear right at the bottom or not at all. Now this could be put down to lots of new votes on other photos but we have all noticed that the order of some photos appears to be wrong.

For example at the moment the photos in 20th (photo ID 1652) and 21st (photo ID 1663) position are I think the wrong way around.

Photo 1652 has a score of 4.7/5 with 3 votes
Photo 1663 has a score of 5/5 with 3 votes

Looking in the database
Photo 1652 has a score of 9333
Photo 1663 has a score of 10000

So surely photo 1663 should be in 20th place and photo 1652 should be in 21st place, shouldnt it?

My setup up is as follows, I'm running CPG 1.3.1:

2x categorys

Category 1 has 1 album
Category 2 has 3 albums

I then have 13 other albums that are not in any category at all

The two photos I mentioned come from 2 different albums that are not in either of the two categorys.

This isnt the only example either. The two photo that are currently in 9th (PID 159) and 10th (PID 1144) place are also the wrong way around.

PID 159 has a score of 4.5/5 with 4 votes
PID 1144 has a score of 4.7/5 with 4 votes

So shouldnt these also be the other way around?
« Last Edit: January 17, 2005, 11:08:51 pm by Casper »
Logged

peakoverload

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 51
Re: Wrong order of photos in Top Rated?
« Reply #1 on: January 17, 2005, 08:50:18 am »

Here is the debug info if its any help:

USER:
------------------
Array
(
    [ID] => 8e2ce7f545cc03f06bfee855692f8f09
    [am] => 1
    [lang] => english
    [liv] => Array
        (
           
  • => 1652
  • [1] => 1483
                [2] => 1639
                [3] => 159
                [4] => 1144
            )

       
[sort] => dd
    [search] => ###G5
    [uid] => 1
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_group] => 1
    [user_active] => YES
    [user_name] => *****
    [user_password] => ********
    [user_lastvisit] => 2005-01-15 12:08:18
    [user_regdate] => 2004-06-12 14:20:55
    [user_group_list] =>
    [user_email] =>
    [user_website] =>
    [user_location] =>
    [user_interests] =>
    [user_occupation] =>
    [user_actkey] =>
    [user_favpics] =>
    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 0
    [ufc_max] => 1
    [ufc_min] => 1
    [custom_user_upload] => 0
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 0
    [has_admin_access] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [upload_form_config] => 1
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
    [groups] => Array
        (
            [1] => 1
        )

)

==========================
Queries:
------------------
Array
(
   
  • => SELECT extension, mime, content FROM cpg130_filetypes;
  • [1] => SELECT * FROM cpg130_users WHERE user_id='1'AND user_active = 'YES' AND user_password != '' AND BINARY MD5(user_password) = '8b9a3c4ad9955d5702173d77ed1eea9b'
        [2] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg130_usergroups WHERE group_id in (1)
        [3] => SELECT group_name FROM  cpg130_usergroups WHERE group_id= 1
        [4] => DELETE FROM cpg130_banned WHERE expiry < 1105947866
        [5] => SELECT * FROM cpg130_banned WHERE ip_addr='80.3.69.175' OR ip_addr='80.3.69.175' OR user_id=1
        [6] => SELECT COUNT(*) from cpg130_pictures WHERE approved = 'YES' AND votes >= '2'
        [7] => SELECT pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, aid, pic_rating, votes, aid FROM cpg130_pictures WHERE approved = 'YES' AND votes >= '2'  ORDER BY ROUND((pic_rating+1)/2000) DESC, votes DESC  LIMIT 0 ,12
    )

    ==========================
    GET :
    ------------------
    Array
    (
       
[album] => toprated
    [cat] => 0
)

==========================
POST :
------------------
Array
(
)

==========================
VERSION INFO :
------------------
PHP version: 4.3.10 - OK
------------------
mySQL version: 4.0.22-standard-log
------------------
Coppermine version: 1.3.1
==========================
Module: gd
------------------
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
==========================
Module: mysql
------------------
Active Persistent Links 0
Active Links 1
Client API version 3.23.49
MYSQL_MODULE_TYPE builtin
MYSQL_SOCKET /var/tmp/mysql.sock
MYSQL_INCLUDE no value
MYSQL_LIBS no value
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.1.4
Linked Version 1.1.4
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .:/usr/lib/php:/usr/local/lib/php | .:/usr/lib/php:/usr/local/lib/php
open_basedir | /home/peakover/:/usr/lib/php:/usr/local/lib/php:/tmp | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/sbin/sendmail -t -i | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | -1 | -1
upload_max_filesize | 2M | 2M
post_max_size | 55M | 55M
==========================
Page generated in 0.16 seconds - 8 queries in 0.019 seconds - Album set :
Logged

peakoverload

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 51
Re: Wrong order of photos in Top Rated?
« Reply #2 on: January 17, 2005, 12:27:44 pm »

I've now applied the hack listed here http://forum.coppermine-gallery.net/index.php?topic=10009.0 so the photos I mentioned are no longer in the order I listed here. I not sure if this hack is the solution I am looking for or not. Apologies for the cross posting I did search before posting this thread but didnt find anything at the time and am still confused by what the hack is doing  ???
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Wrong order of photos in Top Rated?
« Reply #3 on: January 17, 2005, 11:08:27 pm »

Yes, you found the correct thread, and answer, which has been applied to the next version.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.