Page 1 of 1

change order of albums

Posted: Tue Jul 29, 2014 5:51 am
by Koudehand
I've seen and tried the solutions for "reversed order" and they work, but it is not just what I would like.
I like to have the Albums in reversed order, but the pictures in this album by name.
The albums are named like this: "2012 example"; "20130623 exasmple"; 20131003 example"; etc.
The pictures are named like this: "example-001.jpg"; "example-002.jpg"; "example-003.jpg"; etc.

The solutions mentioned in this community not only put the albums in reversed order, but also the pictures in this album. So, I like to see the album of the latest activity first, but in this album I like to see the first picture taken of this activity first. (For example: The first album concerns pictures of the latest hiking trail, but in this album the first picture is from the start of the trail and not the finish.)

I hope someone can help me with this. Thanks in advance.

Re: change order of albums

Posted: Sun Aug 17, 2014 1:51 am
by Vasiljevski
There is a function : writeFolderThumb($default_folder_img, $thumbHeight) in agGallery.php it outputs the album thumbs.
So you can just reverse the order of $this->folders in that function by using standard PHP array_reverse function.
Now only albums will be in revers order, and images will be in the order you setup from the component, in your case by name.