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: Single vote system and Top Rated page MOD  (Read 3264 times)

0 Members and 1 Guest are viewing this topic.

TeraS

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 17
  • Lost but trying really hard...
    • Succubus.net
Single vote system and Top Rated page MOD
« on: June 29, 2009, 03:56:31 pm »

I found in the forum this thread on converting the standard 5 star voting system to a single vote.

http://forum.coppermine-gallery.net/index.php/topic,54319.0.html

That is fine and I can see that the 5 vote system is replaced by a single vote button.

Here is my question...

How would you change the Top Rated page to display the Top Rated images based on the number of votes given per image and not the previous score of 5?

My gallery is at: succubus.net/gallery and I am running 1.4.25 with the lipstik theme...

Thank you in advance!


Tera
Logged

Nibbler

  • Guest
Re: Single vote system and Top Rated page MOD
« Reply #1 on: June 29, 2009, 04:24:28 pm »

Edit include/functions.inc.php, find

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, pid DESC $limit";
Logged

TeraS

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 17
  • Lost but trying really hard...
    • Succubus.net
Re: Single vote system and Top Rated page MOD
« Reply #2 on: June 29, 2009, 04:52:51 pm »

<huggles>

Thank you so very very much!

I will try that this afternoon!


Tera
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 19 queries.