Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Sort Albums in Categories by date  (Read 4685 times)

0 Members and 1 Guest are viewing this topic.

wyukig

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Sort Albums in Categories by date
« 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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Sort Albums in Categories by date
« Reply #1 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)?
Logged

dwdessex

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Sort Albums in Categories by date
« Reply #2 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.
Logged

dwdessex

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Sort Albums in Categories by date
« Reply #3 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
Logged

dwdessex

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Sort Albums in Categories by date
« Reply #4 on: February 29, 2012, 01:48:36 am »

Ok, I was a bit eager.

Still haven't found a solution...
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Sort Albums in Categories by date
« Reply #5 on: March 01, 2012, 02:51:37 pm »

Open index.php, find
Code: [Select]
ORDER BY a.pos, a.aidand replace with
Code: [Select]
ORDER BY a.aid(three times) to sort albums by date created.
Logged

dwdessex

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Sort Albums in Categories by date
« Reply #6 on: March 17, 2012, 12:14:27 am »

Cheers,

I stumbled on it, then saw your reply  :)

Rob
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Sort Albums in Categories by date
« Reply #7 on: March 17, 2012, 09:26:25 am »

If this thread is solved, please
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.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.