Advanced search  

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

Pages: [1]   Go Down

Author Topic: Top rated sorting  (Read 2767 times)

0 Members and 1 Guest are viewing this topic.

dustbunny

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Top rated sorting
« on: August 23, 2006, 08:07:49 am »

I would like it if the stars with more votes would be shown first.

How do I do that?




 
Logged

Nibbler

  • Guest
Re: Top rated sorting
« Reply #1 on: August 23, 2006, 12:29:07 pm »

include/functions.inc.php

Code: [Select]
$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' AND votes >= '{$CONFIG['min_votes_for_rating']}' $META_ALBUM_SET ORDER BY pic_rating DESC, votes DESC, pid DESC $limit";
Change to

Code: [Select]
$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' AND votes >= '{$CONFIG['min_votes_for_rating']}' $META_ALBUM_SET ORDER BY votes DESC, pic_rating DESC, pid DESC $limit";
or however you'd like them to be sorted.
Logged

dustbunny

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Top rated sorting
« Reply #2 on: August 26, 2006, 08:25:51 pm »

When I read the original code it seems that it goes by highest pic_rating and within sorted by number of votes.
EG:
5stars 8votes,
5stars 3votes,
5stars 2votes,
4stars 9votes,
4stars 7votes,
4stars 5votes,
etc.
If so then something is screwed up with my code cause it only sorts by rating only.
EG:
5stars 2votes,
5stars 8votes,
5stars 3votes,
4stars 5votes,
4stars 9votes,
4stars 7votes,
etc. 

Logged

Nibbler

  • Guest
Re: Top rated sorting
« Reply #3 on: August 26, 2006, 08:45:26 pm »

Post a link.
Logged

dustbunny

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Top rated sorting
« Reply #4 on: August 28, 2006, 10:48:48 pm »

Additional point: When I just upgraded from v1.3 to v1.4 it didn't sort correctly since then, even before I did any modifications.

--Warning--
This site has art depicting explicit sexual situations.
http://www.spacefurrs.com/

Nibbler, if this is a sort of thing that you do not wish to see let me know and thanks for the help.
Dustbunny
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.