coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: wyukig on October 30, 2011, 03:43:41 AM

Title: Sort Albums in Categories by date
Post by: wyukig on October 30, 2011, 03:43:41 AM
I tried to search the forums for the string above but no hits came up.
I don't know what its called, but that is precisely what I want, for the new albums created to appear at the front instead of at the back by default.

I looked in the cpg 1.4.x faq and all I can find is the mod to sort the pictures in an album by date.
I want to sort the albums in a category by date as well.
Can't seem to find the option in the config to change it to that.

I know I can change the order of the albums manually one by one, but I don't want to do that everytime, and my gallery member's won't know about it.

So how can I have the latest albums show up in front automatically instead of the oldest.

Thank you in advance for the help.
Title: Re: Sort Albums in Categories by date
Post by: Αndré on November 03, 2011, 04:42:55 PM
When you talk about the "latest albums" do you mean the albums with the latest uploads or the albums that have been created recently (order by album ID)?
Title: Re: Sort Albums in Categories by date
Post by: dwdessex on February 28, 2012, 10:39:29 PM
The OP hasn't replied, but I would like to know how to do this (either by updated or created). I've played around with a few bits, but either there's been no effect or I've caused the site to fail.

I've searched through the forum and haven't found a solution.
Title: Re: Sort Albums in Categories by date
Post by: dwdessex on February 29, 2012, 12:18:11 AM
Finally found it!

http://forum.coppermine-gallery.net/index.php/topic,1379.msg13255.html#msg13255

I'm assuming mtime and ctime and modified and created, which was just what I was looking for!

Rob
Title: Re: Sort Albums in Categories by date
Post by: dwdessex on February 29, 2012, 01:48:36 AM
Ok, I was a bit eager.

Still haven't found a solution...
Title: Re: Sort Albums in Categories by date
Post by: Αndré on March 01, 2012, 02:51:37 PM
Open index.php, find
ORDER BY a.pos, a.aid
and replace with
ORDER BY a.aid
(three times) to sort albums by date created.
Title: Re: Sort Albums in Categories by date
Post by: dwdessex on March 17, 2012, 12:14:27 AM
Cheers,

I stumbled on it, then saw your reply  :)

Rob
Title: Re: Sort Albums in Categories by date
Post by: Αndré on March 17, 2012, 09:26:25 AM
If this thread is solved, please
Quote from: Joachim Müller on September 28, 2008, 12:46:26 PM
tag your answer as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.