Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Display albums most views first  (Read 2336 times)

0 Members and 1 Guest are viewing this topic.

alcorjr

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
Display albums most views first
« on: July 17, 2016, 06:12:46 pm »

Hello guys, how could I make Curve theme display the albums inside each category, from most views to less views?

Thanks,

Alfredo
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: Display albums most views first
« Reply #1 on: July 18, 2016, 12:06:03 pm »

First of all, we're talking about album views and not accumulated pictures views of each album, right? Do you want to display that by default or just as an option for your users?
Logged

alcorjr

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
Re: Display albums most views first
« Reply #2 on: July 19, 2016, 03:33:35 am »

Hello Andre,

Thanks for your reply.
Yes, I was referring to album views, as part of my settings for all users.

Regards,

Alfredo
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: Display albums most views first
« Reply #3 on: July 19, 2016, 10:12:27 am »

Open include/functions.inc.php, find
Code: [Select]
        'pd' => "{$table_alias}pos DESC, {$table_alias}aid DESC",and below, add
Code: [Select]
        'va' => "{$table_alias}alb_hits ASC, {$table_alias}aid ASC",
        'vd' => "{$table_alias}alb_hits DESC, {$table_alias}aid DESC",

Now, install the latest version of the hidden features plugin (as described in the docs) and set the album sort order to your needs: http://forum.coppermine-gallery.net/index.php/topic,77314.0.html
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: Display albums most views first
« Reply #4 on: July 19, 2016, 10:45:55 am »

The above change has been added to cpg1.5.x and cpg1.6.x. Will be included in cpg1.5.44 and higher.
Logged
Pages: [1]   Go Up
 

Page created in 0.014 seconds with 21 queries.