Display albums most views first Display albums most views first
 

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]

Main Menu

Display albums most views first

Started by alcorjr, July 17, 2016, 06:12:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alcorjr

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

Thanks,

Alfredo

Αndré

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?

alcorjr

Hello Andre,

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

Regards,

Alfredo

Αndré

Open include/functions.inc.php, find
        'pd' => "{$table_alias}pos DESC, {$table_alias}aid DESC",
and below, add
        '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

Αndré

The above change has been added to cpg1.5.x and cpg1.6.x. Will be included in cpg1.5.44 and higher.